110 lines
3.1 KiB
TypeScript
110 lines
3.1 KiB
TypeScript
import pluginQuery from '@tanstack/eslint-plugin-query';
|
|
// @ts-expect-error fix package
|
|
import config from 'eslint-config-ksv741';
|
|
|
|
export default [
|
|
...pluginQuery.configs['flat/recommended'],
|
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
...config,
|
|
{
|
|
rules: {
|
|
'import/no-extraneous-dependencies': ['error', {
|
|
devDependencies: ['eslint.config.ts', 'rsbuild.config.ts', 'configs/**/*'],
|
|
}],
|
|
'import/no-anonymous-default-export': 'off',
|
|
'import/order': [
|
|
'error', {
|
|
pathGroups: [
|
|
{
|
|
pattern: '__spec__/**',
|
|
group: 'builtin',
|
|
position: 'before',
|
|
},
|
|
{
|
|
pattern: 'apps/**',
|
|
group: 'internal',
|
|
position: 'after',
|
|
},
|
|
{
|
|
pattern: 'pages/**',
|
|
group: 'internal',
|
|
position: 'after',
|
|
},
|
|
{
|
|
pattern: 'widgets/**',
|
|
group: 'internal',
|
|
position: 'after',
|
|
},
|
|
{
|
|
pattern: 'features/**',
|
|
group: 'internal',
|
|
position: 'after',
|
|
},
|
|
{
|
|
pattern: 'entities/**',
|
|
group: 'internal',
|
|
position: 'after',
|
|
},
|
|
{
|
|
pattern: 'shared/**',
|
|
group: 'internal',
|
|
position: 'after',
|
|
},
|
|
],
|
|
distinctGroup: true,
|
|
groups: [
|
|
'builtin',
|
|
'external',
|
|
'internal',
|
|
'parent',
|
|
'sibling',
|
|
'object',
|
|
'index',
|
|
'type',
|
|
],
|
|
'newlines-between': 'always',
|
|
alphabetize: {
|
|
order: 'asc',
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
'@typescript-eslint/no-floating-promises': 'off',
|
|
'@typescript-eslint/consistent-return': 'off',
|
|
'func-style': 'off',
|
|
'@typescript-eslint/no-confusing-void-expression': 'off',
|
|
'@typescript-eslint/await-thenable': 'off',
|
|
'@typescript-eslint/no-misused-promises': 'off',
|
|
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
'@typescript-eslint/no-unnecessary-condition': 'off',
|
|
'jsx-a11y/click-events-have-key-events': 'off',
|
|
'jsx-a11y/no-static-element-interactions': 'off',
|
|
'jsx-a11y/no-noninteractive-element-interactions': 'off',
|
|
'@stylistic/indent': 'off',
|
|
'@stylistic/jsx-one-expression-per-line': 'off',
|
|
},
|
|
},
|
|
{
|
|
ignores: ['./src/shared/api/schema.ts'],
|
|
},
|
|
{
|
|
files: [
|
|
'**/*.test.js',
|
|
'**/*.test.jsx',
|
|
'**/*.test.ts',
|
|
'**/*.test.tsx',
|
|
'**/__tests__/**',
|
|
'**/tests/**',
|
|
],
|
|
rules: {
|
|
'import/no-extraneous-dependencies': [
|
|
'error',
|
|
{ devDependencies: true }, // в тестах можно
|
|
],
|
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
},
|
|
},
|
|
];
|