86 lines
2.3 KiB
TypeScript
86 lines
2.3 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'],
|
|
}],
|
|
'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',
|
|
},
|
|
},
|
|
{
|
|
ignores: ['./src/shared/api/schema.ts'],
|
|
},
|
|
];
|