From 5e15b8c9dcb500be795c1353aea382cc2262838f Mon Sep 17 00:00:00 2001 From: Alex <8125011+alex-kinokon@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:29:57 -0400 Subject: [PATCH] fix lint issues --- dist/index.d.ts | 2 +- dist/package.json | 2 +- src/index.ts | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index 9f9c38c..54c8a33 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -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; diff --git a/dist/package.json b/dist/package.json index b28695f..ebc3542 100644 --- a/dist/package.json +++ b/dist/package.json @@ -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", diff --git a/src/index.ts b/src/index.ts index 22c811a..f01eeda 100644 --- a/src/index.ts +++ b/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': [