From 2e08251e1572ff24977217013e98e5994a8e95d4 Mon Sep 17 00:00:00 2001 From: 3y3 <3y3@ya.ru> Date: Mon, 18 Sep 2023 02:07:00 +0300 Subject: [PATCH] chore: Fix lint --- .eslintrc.js | 2 +- .eslintrc.publish.js | 4 ---- src/components/Control/Control.tsx | 3 ++- src/components/Controls/single-controls/LangControl.tsx | 6 ++++-- .../single-controls/SettingsControl/SettingsControl.tsx | 3 ++- src/components/Paginator/Paginator.tsx | 3 ++- src/components/TocItem/TocItem.tsx | 3 ++- 7 files changed, 13 insertions(+), 11 deletions(-) delete mode 100644 .eslintrc.publish.js diff --git a/.eslintrc.js b/.eslintrc.js index 41f66727..6ef15ca9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { extends: [ '@gravity-ui/eslint-config', - process.env.npm && '@gravity-ui/eslint-config/prettier', + process.env.npm_command && '@gravity-ui/eslint-config/prettier', ].filter(Boolean), root: true, rules: { diff --git a/.eslintrc.publish.js b/.eslintrc.publish.js deleted file mode 100644 index e54537de..00000000 --- a/.eslintrc.publish.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - extends: ['@gravity-ui/eslint-config/prettier', './.eslintrc.js'], - root: true, -}; diff --git a/src/components/Control/Control.tsx b/src/components/Control/Control.tsx index bbaafc74..aa779526 100644 --- a/src/components/Control/Control.tsx +++ b/src/components/Control/Control.tsx @@ -1,6 +1,7 @@ +import React, {forwardRef, useCallback, useImperativeHandle, useRef} from 'react'; + import {Button, ButtonProps, Popup} from '@gravity-ui/uikit'; import block from 'bem-cn-lite'; -import React, {forwardRef, useCallback, useImperativeHandle, useRef} from 'react'; import {PopperPosition, usePopupState} from '../../hooks'; import {ControlSizes} from '../../models'; diff --git a/src/components/Controls/single-controls/LangControl.tsx b/src/components/Controls/single-controls/LangControl.tsx index 9c226ffc..eba6cbc6 100644 --- a/src/components/Controls/single-controls/LangControl.tsx +++ b/src/components/Controls/single-controls/LangControl.tsx @@ -1,17 +1,19 @@ +import React, {useCallback, useContext, useMemo, useRef} from 'react'; + import {Globe} from '@gravity-ui/icons'; import {List, Popover} from '@gravity-ui/uikit'; import block from 'bem-cn-lite'; import allLangs from 'langs'; -import React, {useCallback, useContext, useMemo, useRef} from 'react'; import {usePopupState, useTranslation} from '../../../hooks'; import {Lang} from '../../../models'; import {Control} from '../../Control'; -import '../Controls.scss'; import {ControlsLayoutContext} from '../ControlsLayout'; import {getPopupPosition} from './utils'; +import '../Controls.scss'; + const ICONS: Record<string, string> = { en: '🇬🇧', ru: '🇷🇺', diff --git a/src/components/Controls/single-controls/SettingsControl/SettingsControl.tsx b/src/components/Controls/single-controls/SettingsControl/SettingsControl.tsx index 435e1ed9..d68ef2e9 100644 --- a/src/components/Controls/single-controls/SettingsControl/SettingsControl.tsx +++ b/src/components/Controls/single-controls/SettingsControl/SettingsControl.tsx @@ -1,7 +1,8 @@ +import React, {ReactElement, useCallback, useContext, useRef, useState} from 'react'; + import {Gear} from '@gravity-ui/icons'; import {Button, List, Popover, Switch} from '@gravity-ui/uikit'; import cn from 'bem-cn-lite'; -import React, {ReactElement, useCallback, useContext, useRef, useState} from 'react'; import {useTranslation} from '../../../../hooks'; import {TextSizes, Theme} from '../../../../models'; diff --git a/src/components/Paginator/Paginator.tsx b/src/components/Paginator/Paginator.tsx index ca1cc337..63ff4014 100644 --- a/src/components/Paginator/Paginator.tsx +++ b/src/components/Paginator/Paginator.tsx @@ -1,7 +1,8 @@ +import React, {ReactNode} from 'react'; + import {ArrowLeft, ArrowRight} from '@gravity-ui/icons'; import {Button} from '@gravity-ui/uikit'; import block from 'bem-cn-lite'; -import React, {ReactNode} from 'react'; import {useTranslation} from '../../hooks'; diff --git a/src/components/TocItem/TocItem.tsx b/src/components/TocItem/TocItem.tsx index 948b6cc4..f63dbc81 100644 --- a/src/components/TocItem/TocItem.tsx +++ b/src/components/TocItem/TocItem.tsx @@ -1,6 +1,7 @@ -import block from 'bem-cn-lite'; import React from 'react'; +import block from 'bem-cn-lite'; + import {TocItem as ITocItem} from '../../models'; import {isExternalHref} from '../../utils'; import {ToggleArrow} from '../ToggleArrow';