diff --git a/.gitignore b/.gitignore index 6a62380..117c2ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ !/packages/eslint-plugin-react-hooks /react +src/types/rules dist/**/*.js dist/**/*.js.map diff --git a/dist/package.json b/dist/package.json index df3c0b8..7e2d7a8 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@aet/eslint-rules", - "version": "0.0.24-beta.1", + "version": "0.0.24-beta.3", "license": "UNLICENSED", "peerDependencies": { "eslint": "^8.57.0", @@ -57,4 +57,4 @@ "supports-preserve-symlinks-flag": "file:./overrides/supports-preserve-symlinks-flag" } } -} +} \ No newline at end of file diff --git a/packages/eslint-import-resolver-typescript b/packages/eslint-import-resolver-typescript index 7b6bfc3..7a02ac0 160000 --- a/packages/eslint-import-resolver-typescript +++ b/packages/eslint-import-resolver-typescript @@ -1 +1 @@ -Subproject commit 7b6bfc39474817efda02d186349523bb2bd569cf +Subproject commit 7a02ac08b5aaac8c217f0e87142f97eafcc38fbc diff --git a/packages/eslint-plugin-import b/packages/eslint-plugin-import index 6b95a02..f77ceb6 160000 --- a/packages/eslint-plugin-import +++ b/packages/eslint-plugin-import @@ -1 +1 @@ -Subproject commit 6b95a021938139726b3f862beb37012d6e2afab2 +Subproject commit f77ceb679d59ced5d9a633123385470a9eea10d9 diff --git a/packages/eslint-plugin-jsx-a11y b/packages/eslint-plugin-jsx-a11y index fffb05b..0d5321a 160000 --- a/packages/eslint-plugin-jsx-a11y +++ b/packages/eslint-plugin-jsx-a11y @@ -1 +1 @@ -Subproject commit fffb05b38c8eee926ee758e9ceb9eae4e697fbdd +Subproject commit 0d5321a5457c5f0da0ca216053cc5b4f571b53ae diff --git a/packages/eslint-plugin-n b/packages/eslint-plugin-n index 47cd9a6..eb11b5b 160000 --- a/packages/eslint-plugin-n +++ b/packages/eslint-plugin-n @@ -1 +1 @@ -Subproject commit 47cd9a6a0e360d10d50e27a01123169dec00d40b +Subproject commit eb11b5b35a6a797dc7fba6df53b1c4dada3a2a55 diff --git a/packages/eslint-plugin-react b/packages/eslint-plugin-react index ecadb92..4467db5 160000 --- a/packages/eslint-plugin-react +++ b/packages/eslint-plugin-react @@ -1 +1 @@ -Subproject commit ecadb92609998520be80d64c0bd6bc5e05934aa9 +Subproject commit 4467db503e38b9356517cf6926d11be544ccf4b1 diff --git a/src/index.ts b/src/index.ts index 319723e..733f1d1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -167,13 +167,7 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig { }, overrides: [ { - files: [ - '.eslintrc.js', - '*.config.js', - 'index.js', - 'babel.config.js', - 'next.config.js', - ], + files: ['.eslintrc.js', '.eslintrc.cjs', '*.config.js', 'index.js'], extends: ['plugin:@typescript-eslint/disable-type-checked'], rules: { 'rules/restrict-template-expressions': off, @@ -186,7 +180,7 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig { }, }, { - files: ['repl.ts'], + files: ['repl.ts', 'scripts/**/*.ts'], rules: { 'no-console': off, }, diff --git a/src/presets/eslint.ts b/src/presets/eslint.ts index 96f9d41..77650c8 100644 --- a/src/presets/eslint.ts +++ b/src/presets/eslint.ts @@ -42,7 +42,15 @@ export const eslintRules: Partial = { 'prefer-spread': warn, 'quote-props': [error, 'as-needed'], 'sort-imports': [warn, { ignoreDeclarationSort: true }], - 'spaced-comment': [error, 'always', { markers: ['/', '#', '@'] }], + 'spaced-comment': [ + error, + 'always', + { + markers: ['/', '#', '@'], + // allow /*@__PURE__*/ + block: { exceptions: ['@'] }, + }, + ], complexity: [warn, { max: 100 }], curly: [error, 'multi-line', 'consistent'], eqeqeq: [error, 'smart'],