-
Notifications
You must be signed in to change notification settings - Fork 1
steroids/dev#804 upgrade streoids/eslint-config #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Как связан этот мр с задачей, на которую он ссылается? |
Задачи, на обновление конфигурации eslint'a до последней версии нет. Мне оказалось сподручно обновить и его, пока обновлял react. Это MR и MR на обновление реакта независимы друг от друга. Т.к. Это не совсем по задаче, сделал это в отдельном МР. Если для этого нужна отдельная задача, могу создать. |
Пара моментов:
|
Это изменения, приводящие код в соответствие с правилами линтера. Pipeline с ошибкой завершится по lint стадии |
Теперь понятно. Тогда создай, пожалуйста, в гитлабе под это задачу, и реф задачи укажи в этих двух MRах |
import _isFunction from 'lodash-es/isFunction'; | ||
import _isEqual from 'lodash-es/isEqual'; | ||
import _uniqBy from 'lodash-es/uniqBy'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нужно вернуть возможность отделять импорты пустой строкой, в идеале привести к такому виду
- импорты из реакта, стероидов и сторонних библиотек
// перенос строки
- импорты из корневых папок проекта, для них должен быть алиас, чтобы можно было не указывать весь путь
// перенос строки
- импорты внутри папки
Мне кажется, так сразу будет понятно, откуда что импортируется.
import React from 'react';
import useBem from '@steroidsjs/core/hooks/useBem';
import {DateFormatter} from '@steroidsjs/core/ui/format';
import {Text} from '@steroidsjs/core/ui/typography';
import {Link} from '@steroidsjs/core/ui/nav';
import BaseGrid from 'shared/BaseGrid';
import Button from './views/Button;
Подобное мы делали в Клиницисте, можно посмотреть тут
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Как вариант
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ProFIT1337 Давай так, да
…le to start of ResourceComponent.ts
|
||
export const reInit = () => init(); | ||
|
||
// eslint-disable-next-line default-param-last |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему дизейблится правило, а не меняется местами параметр?
|
||
export const showNotification = ( | ||
message: string, | ||
// eslint-disable-next-line default-param-last |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
То же что и выше
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем?
@@ -1,4 +1,5 @@ | |||
/* eslint-disable @typescript-eslint/ban-ts-comment */ | |||
/* eslint-disable no-promise-executor-return */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ошибки в каком коде отключает это правило, и почему оно включено для всего файла?
lang: this.language || locale.language, | ||
}, | ||
// @ts-ignore | ||
// eslint-disable-next-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Какую ошибку выключает эта и следующая команда?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отступы поехали
// import {CKEditor} from '@ckeditor/ckeditor5-react'; | ||
// import ClassicEditor from '@steroidsjs/ckeditor5/packages/ckeditor5-build-classic'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Странное перемещение
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отступы поехали
bem.block( | ||
<div className={bem(bem.block( | ||
{ | ||
loading: props.isLoading || props.list?.isLoading, | ||
size: props.size, | ||
alternatingColors: props.hasAlternatingColors, | ||
}, | ||
), props.className, | ||
)} | ||
), props.className)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Стало не лучше
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отступы поехали
No description provided.