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')[];
|
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",
|
"name": "@aet/eslint-rules",
|
||||||
"version": "0.0.1-beta.32",
|
"version": "0.0.1-beta.33",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"esbin": "^0.0.2",
|
"esbin": "^0.0.2",
|
||||||
|
10
src/index.ts
10
src/index.ts
@ -22,6 +22,7 @@ export function extendConfig({
|
|||||||
settings,
|
settings,
|
||||||
rules,
|
rules,
|
||||||
extends: _extends,
|
extends: _extends,
|
||||||
|
overrides,
|
||||||
...rest
|
...rest
|
||||||
}: ESLintConfig): ESLintConfig {
|
}: ESLintConfig): ESLintConfig {
|
||||||
const hasReact = plugins?.includes('react');
|
const hasReact = plugins?.includes('react');
|
||||||
@ -36,7 +37,7 @@ export function extendConfig({
|
|||||||
env: { node: true, browser: true, es2023: true },
|
env: { node: true, browser: true, es2023: true },
|
||||||
reportUnusedDisableDirectives: true,
|
reportUnusedDisableDirectives: true,
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: ['./tsconfig.json'],
|
project: true,
|
||||||
},
|
},
|
||||||
extends: unique([
|
extends: unique([
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
@ -68,6 +69,13 @@ export function extendConfig({
|
|||||||
},
|
},
|
||||||
...settings,
|
...settings,
|
||||||
},
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['.eslintrc.js', '*.config.js', 'index.js'],
|
||||||
|
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
||||||
|
},
|
||||||
|
...(overrides ?? []),
|
||||||
|
],
|
||||||
rules: {
|
rules: {
|
||||||
'no-duplicate-imports': error,
|
'no-duplicate-imports': error,
|
||||||
'no-restricted-imports': [
|
'no-restricted-imports': [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user