fix lint issues
This commit is contained in:
10
src/index.ts
10
src/index.ts
@ -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': [
|
||||
|
Reference in New Issue
Block a user