Skip to content

Commit b7ddcb5

Browse files
committed
Fix root eslint.config.mjs file
1 parent 583e2e1 commit b7ddcb5

File tree

1 file changed

+17
-61
lines changed

1 file changed

+17
-61
lines changed

eslint.config.mjs

Lines changed: 17 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,17 @@
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+
/**
2+
* @import { Linter } from 'eslint'
3+
*/
4+
5+
import js from '@eslint/js'
6+
import prettierConfig from 'eslint-config-prettier'
7+
8+
/**
9+
* @satisfies {Linter.Config[]}
10+
*/
11+
const ESLintConfig = [
12+
{ name: 'ignores', ignores: ['**/'] },
13+
{ name: 'javascript', ...js.configs.recommended },
14+
{ name: 'prettier-config', ...prettierConfig },
15+
]
16+
17+
export default ESLintConfig

0 commit comments

Comments
 (0)