-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.eslintrc.js
61 lines (61 loc) · 1.84 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
module.exports = {
extends: ['react-app', 'prettier'],
parser: '@typescript-eslint/parser',
rules: {
'jsx-a11y/href-no-hash': 'off',
'react/react-in-jsx-scope': 'off',
// Taken care of by TypeScript's `noUnusedLocals` / `noUnusedParameters`
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
// Silence some bizarre "rule not found" TSLint error
'@typescript-eslint/no-angle-bracket-type-assertion': 'off',
'no-redeclare': 'off',
// Silence some bizarre "rule not found" TSLint error
'@typescript-eslint/no-redeclare': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports', disallowTypeAnnotations: false },
],
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: '(usePossiblyImmediateEffect)',
},
],
},
overrides: [
// {
// // only add after https://github.com/typescript-eslint/typescript-eslint/pull/3463 is merged
// files: ['src/**/*.ts'],
// excludedFiles: [
// '**/tests/*.ts',
// '**/tests/**/*.ts',
// '**/tests/*.tsx',
// '**/tests/**/*.tsx',
// ],
// parserOptions: {
// project: './tsconfig.json',
// },
// rules: {
// '@typescript-eslint/prefer-readonly-parameter-types': [
// 'warn',
// { arraysAndTuplesOnly: true },
// ],
// },
// },
{
files: [
'packages/toolkit/src/tests/*.ts',
'packages/toolkit/src/**/tests/*.ts',
'packages/toolkit/src/**/tests/*.tsx',
],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
'no-lone-blocks': 'off',
'no-sequences': 'off',
},
},
],
}