fix lint issues
This commit is contained in:
parent
8a73947697
commit
5e15b8c9dc
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
@ -4,4 +4,4 @@ declare module 'eslint-define-config/src/rules/react/no-unknown-property.d.ts' {
|
||||
extends: ('next' | 'emotion')[];
|
||||
}
|
||||
}
|
||||
export declare function extendConfig({ plugins, settings, rules, extends: _extends, ...rest }: ESLintConfig): ESLintConfig;
|
||||
export declare function extendConfig({ plugins, settings, rules, extends: _extends, overrides, ...rest }: ESLintConfig): ESLintConfig;
|
||||
|
2
dist/package.json
vendored
2
dist/package.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@aet/eslint-rules",
|
||||
"version": "0.0.1-beta.32",
|
||||
"version": "0.0.1-beta.33",
|
||||
"license": "UNLICENSED",
|
||||
"peerDependencies": {
|
||||
"esbin": "^0.0.2",
|
||||
|
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': [
|
||||
|
Loading…
x
Reference in New Issue
Block a user