-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
72 lines (71 loc) · 2.06 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
62
63
64
65
66
67
68
69
70
71
72
const rules = {
ON: 2,
OFF: 0,
WARN: 1,
}
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['react-hooks', '@typescript-eslint', 'import', 'jsx-a11y'],
parserOptions: {
project: ['./tsconfig.json'],
createDefaultProgram: true,
sourceType: 'module',
},
extends: [
'plugin:@typescript-eslint/recommended',
'airbnb-typescript',
'plugin:react/recommended',
'plugin:@next/next/recommended',
'eslint-config-prettier',
],
rules: {
'@typescript-eslint/naming-convention': rules.OFF,
'@typescript-eslint/camelcase': rules.OFF,
'@typescript-eslint/explicit-function-return-type': rules.OFF,
'@typescript-eslint/explicit-member-accessibility': rules.OFF,
'@typescript-eslint/no-non-null-assertion': rules.OFF,
'@typescript-eslint/no-unused-vars': rules.OFF,
'@typescript-eslint/array-type': rules.OFF,
'@typescript-eslint/no-explicit-any': rules.OFF,
'@typescript-eslint/no-empty-interface': rules.OFF,
'@typescript-eslint/no-empty-function': rules.OFF,
'@typescript-eslint/no-use-before-define': rules.OFF,
'@typescript-eslint/no-object-literal-type-assertion': rules.OFF,
'@typescript-eslint/no-var-requires': rules.OFF,
'import/no-extraneous-dependencies': rules.OFF,
'import/prefer-default-export': rules.OFF,
'react/no-deprecated': rules.OFF,
'react/prop-types': rules.OFF,
'react-hooks/rules-of-hooks': rules.ON,
'react-hooks/exhaustive-deps': rules.WARN,
'react/require-default-props': rules.OFF,
'react/no-unescaped-entities': rules.OFF,
'react/jsx-props-no-spreading': rules.OFF,
'prefer-spread': rules.WARN,
'prefer-arrow-callback': rules.OFF,
'no-nested-ternary': rules.OFF,
'jsx-a11y/anchor-is-valid': rules.OFF,
'jsx-a11y/label-has-associated-control': [
rules.ON,
{
labelComponents: ['Label'],
// labelAttributes: ["label"],
controlComponents: ['Radio', 'Checkbox', 'Input'],
depth: 3,
},
],
},
overrides: [
{
files: ['*.json'],
rules: {
'@typescript-eslint/no-unused-expressions': rules.OFF,
},
},
],
settings: {
react: {
version: 'detect',
},
},
}