fix lint issues

This commit is contained in:
Alex
2023-08-25 11:29:57 -04:00
parent 8a73947697
commit 5e15b8c9dc
3 changed files with 11 additions and 3 deletions

View File

@ -22,6 +22,7 @@ export function extendConfig({
settings,
rules,
extends: _extends,
overrides,
...rest
}: ESLintConfig): ESLintConfig {
const hasReact = plugins?.includes('react');
@ -36,7 +37,7 @@ export function extendConfig({
env: { node: true, browser: true, es2023: true },
reportUnusedDisableDirectives: true,
parserOptions: {
project: ['./tsconfig.json'],
project: true,
},
extends: unique([
'eslint:recommended',
@ -68,6 +69,13 @@ export function extendConfig({
},
...settings,
},
overrides: [
{
files: ['.eslintrc.js', '*.config.js', 'index.js'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
},
...(overrides ?? []),
],
rules: {
'no-duplicate-imports': error,
'no-restricted-imports': [