Skip to content

Commit 5afe694

Browse files
committed
Fix root eslint.config.mts file
1 parent 8c92baf commit 5afe694

File tree

3 files changed

+10
-62
lines changed

3 files changed

+10
-62
lines changed

eslint.config.mts

Lines changed: 7 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,7 @@
1-
module.exports = {
2-
extends: ['react-app', 'prettier'],
3-
parser: '@typescript-eslint/parser',
4-
rules: {
5-
'jsx-a11y/href-no-hash': 'off',
6-
'react/react-in-jsx-scope': 'off',
7-
// Taken care of by TypeScript's `noUnusedLocals` / `noUnusedParameters`
8-
'no-unused-vars': 'off',
9-
'@typescript-eslint/no-unused-vars': 'off',
10-
// Silence some bizarre "rule not found" TSLint error
11-
'@typescript-eslint/no-angle-bracket-type-assertion': 'off',
12-
'no-redeclare': 'off',
13-
// Silence some bizarre "rule not found" TSLint error
14-
'@typescript-eslint/no-redeclare': 'off',
15-
'no-use-before-define': 'off',
16-
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
17-
'@typescript-eslint/consistent-type-imports': [
18-
'error',
19-
{ prefer: 'type-imports', disallowTypeAnnotations: false },
20-
],
21-
'react-hooks/exhaustive-deps': [
22-
'warn',
23-
{
24-
additionalHooks: '(usePossiblyImmediateEffect)',
25-
},
26-
],
27-
},
28-
overrides: [
29-
// {
30-
// // only add after https://github.com/typescript-eslint/typescript-eslint/pull/3463 is merged
31-
// files: ['src/**/*.ts'],
32-
// excludedFiles: [
33-
// '**/tests/*.ts',
34-
// '**/tests/**/*.ts',
35-
// '**/tests/*.tsx',
36-
// '**/tests/**/*.tsx',
37-
// ],
38-
// parserOptions: {
39-
// project: './tsconfig.json',
40-
// },
41-
// rules: {
42-
// '@typescript-eslint/prefer-readonly-parameter-types': [
43-
// 'warn',
44-
// { arraysAndTuplesOnly: true },
45-
// ],
46-
// },
47-
// },
48-
{
49-
files: [
50-
'packages/toolkit/src/tests/*.ts',
51-
'packages/toolkit/src/**/tests/*.ts',
52-
'packages/toolkit/src/**/tests/*.tsx',
53-
],
54-
rules: {
55-
'@typescript-eslint/no-unused-expressions': 'off',
56-
'no-lone-blocks': 'off',
57-
'no-sequences': 'off',
58-
},
59-
},
60-
],
61-
}
1+
import { createESLintConfig } from '@reduxjs/eslint-config'
2+
import { configs } from 'typescript-eslint'
3+
4+
export default createESLintConfig([
5+
{ name: 'root-workspace/global-ignores', ignores: ['**/'] },
6+
configs.disableTypeChecked,
7+
])

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"release-it": "^14.12.5",
4444
"serve": "^14.2.0",
4545
"ts-node": "^10.9.2",
46-
"typescript": "^5.5.4"
46+
"typescript": "^5.5.4",
47+
"typescript-eslint": "^8.6.0"
4748
},
4849
"resolutions": {
4950
"jest-snapshot": "29.3.1"

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23808,6 +23808,7 @@ __metadata:
2380823808
serve: "npm:^14.2.0"
2380923809
ts-node: "npm:^10.9.2"
2381023810
typescript: "npm:^5.5.4"
23811+
typescript-eslint: "npm:^8.6.0"
2381123812
languageName: unknown
2381223813
linkType: soft
2381323814

0 commit comments

Comments
 (0)