-
Notifications
You must be signed in to change notification settings - Fork 0
steroids/dev#804 updated steroids/eslint-config #253
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Отсутпы поехали |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ export default function MenuView(props: IMenuViewProps) { | |
const MenuItemView = props.itemView; | ||
|
||
const renderMenuItems = React.useCallback(() => ( | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Это точно бест практис? Может как-то можно вернуть фрагмент без отрубания правил линта? |
||
<> | ||
{props.items?.map((item, index) => ( | ||
<MenuItemView | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,15 +108,13 @@ export default function AutoCompleteFieldView(props: IAutoCompleteFieldViewProps | |
return ( | ||
<div | ||
ref={props.forwardedRef} | ||
className={bem( | ||
bem.block({ | ||
className={bem(bem.block({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Будто бы стало менее читаемо. Какое lint-правило заставляет так писать? |
||
size: props.size, | ||
opened: props.isOpened, | ||
hasClearIcon: props.showClear && !props.disabled, | ||
filled: !!props.inputProps.value, | ||
disabled: props.disabled, | ||
}), props.className, | ||
)} | ||
}), props.className)} | ||
style={props.style} | ||
> | ||
<div className={bem.element('input-wrapper')}> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Отсутпы поехали |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import React, {useMemo} from 'react'; | ||
import {useBem, useComponents} from '@steroidsjs/core/hooks'; | ||
|
||
import {IDateRangeButton, IDateRangeFieldViewProps} from '@steroidsjs/core/ui/form/DateRangeField/DateRangeField'; | ||
import {Button} from '@steroidsjs/core/ui/form'; | ||
import {RANGE_BUTTONS} from './consts'; | ||
|
@@ -31,13 +30,15 @@ export default function RangeButtons(props: IRangeButtonsProps) { | |
const {locale} = useComponents(); | ||
|
||
const {changeFrom, changeTo} = props; | ||
const buttons = useMemo( | ||
() => (Array.isArray(props.config) ? props.config : DEFAULT_BUTTONS) | ||
.map((button) => ({ | ||
...button, | ||
onClick: button.onClick.bind(null, locale, changeFrom, changeTo, props.format || DEFAULT_VALUE_FORMAT), | ||
})), [changeFrom, changeTo, locale, props.config, props.format], | ||
); | ||
const buttons = useMemo(() => ( | ||
Array.isArray(props.config) | ||
? props.config | ||
: DEFAULT_BUTTONS | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Скобка не может быть на этом уровне, так как она внутри |
||
.map((button) => ({ | ||
...button, | ||
onClick: button.onClick.bind(null, locale, changeFrom, changeTo, props.format || DEFAULT_VALUE_FORMAT), | ||
})), [changeFrom, changeTo, locale, props.config, props.format]); | ||
|
||
return ( | ||
<div className={bem.block({position: props.position})}> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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.
Какую ошибку прячет этот коммент?