diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index a78cc751d..000000000 --- a/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -npx commitlint --edit $1 diff --git a/src/.eslintrc b/src/.eslintrc index b328248ce..40a800ed4 100644 --- a/src/.eslintrc +++ b/src/.eslintrc @@ -19,6 +19,17 @@ "selector": "ImportDeclaration[source.value='axios'] :matches(ImportSpecifier[imported.name='isAxiosError'])", "message": "Please use isAxiosError from utils/response instead of axios", }, - ], + ], + "no-restricted-imports": [ + "error", + { + "patterns": [ + { + "group": [".*/**/lib"], + "message": "Please use direct imports instead", + }, + ], + }, + ], }, } diff --git a/src/components/ElapsedTime/ElapsedTime.tsx b/src/components/ElapsedTime/ElapsedTime.tsx index 42c7cf48c..b0301231b 100644 --- a/src/components/ElapsedTime/ElapsedTime.tsx +++ b/src/components/ElapsedTime/ElapsedTime.tsx @@ -3,7 +3,8 @@ import React from 'react'; import {duration} from '@gravity-ui/date-utils'; import {Label} from '@gravity-ui/uikit'; -import {HOUR_IN_SECONDS, SECOND_IN_MS, cn} from '../../lib'; +import {cn} from '../../utils/cn'; +import {HOUR_IN_SECONDS, SECOND_IN_MS} from '../../utils/constants'; const b = cn('ydb-query-elapsed-time'); diff --git a/src/components/EntitiesCount/EntitiesCount.tsx b/src/components/EntitiesCount/EntitiesCount.tsx index a6722c15e..fe71cf563 100644 --- a/src/components/EntitiesCount/EntitiesCount.tsx +++ b/src/components/EntitiesCount/EntitiesCount.tsx @@ -1,7 +1,11 @@ import {Label} from '@gravity-ui/uikit'; +import {cn} from '../../utils/cn'; + import i18n from './i18n'; +const b = cn('ydb-entities-count'); + interface EntitiesCountProps { current: number | string; total?: number | string; @@ -28,7 +32,7 @@ export const EntitiesCount = ({total, current, label, loading, className}: Entit } return ( -