Update rules
This commit is contained in:
@ -7,22 +7,13 @@ import { defineMiddleware } from '../middleware';
|
||||
const importRules: Partial<ImportXRulesObject> = {
|
||||
'import-x/first': error,
|
||||
'import-x/no-absolute-path': error,
|
||||
'import-x/no-duplicates': error,
|
||||
'import-x/no-duplicates': warn,
|
||||
'import-x/no-useless-path-segments': error,
|
||||
'import-x/order': [
|
||||
error,
|
||||
warn,
|
||||
{
|
||||
groups: [
|
||||
'builtin',
|
||||
'external',
|
||||
'internal',
|
||||
'parent',
|
||||
'sibling',
|
||||
'index',
|
||||
'object',
|
||||
'type',
|
||||
],
|
||||
'newlines-between': 'always-and-inside-groups',
|
||||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
|
||||
'newlines-between': 'always',
|
||||
alphabetize: { order: 'asc', caseInsensitive: true },
|
||||
},
|
||||
],
|
||||
@ -83,18 +74,19 @@ export const importTypeScript = defineMiddleware((config, { addRules, addSetting
|
||||
});
|
||||
config.overrides.push(
|
||||
{
|
||||
files: ['.eslintrc.js', '.eslintrc.cjs', '*.config.js', 'index.js'],
|
||||
files: ['.eslintrc.js', '*.config.js', '*.cjs', '*.mjs'],
|
||||
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
||||
rules: {
|
||||
'import-x/no-commonjs': off,
|
||||
'import-x/unambiguous': off,
|
||||
'@typescript-eslint/no-require-imports': off,
|
||||
'rules/restrict-template-expressions': off,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.d.ts'],
|
||||
rules: {
|
||||
'@typescript-eslint/consistent-type-imports': off,
|
||||
'import-x/unambiguous': off,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user