-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
146 lines (146 loc) · 3.55 KB
/
.eslintrc.json
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
"root": true,
"env": {
"node": true,
"commonjs": true,
"es6": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"airbnb/hooks",
"airbnb-typescript",
"eslint:recommended",
"prettier",
"prettier/react",
"prettier/@typescript-eslint",
"plugin:jest/recommended",
"plugin:cypress/recommended",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended",
"@react-native-community"
],
"plugins": [
"@typescript-eslint",
"react",
"jsx-a11y",
"react-hooks",
"import",
"jsdoc",
"jest",
"cypress",
"@react-native-community"
],
"globals": {
"JSX": true
},
"settings": {
"jsdoc": {
"mode": "typescript"
}
},
"rules": {
"radix": "off",
"arrow-parens": "error",
"no-prototype-builtins": "off",
"import/no-default-export": "error",
"import/prefer-default-export": "off",
"no-use-before-define": "off",
"no-restricted-imports": [
"error",
{
"patterns": ["@material-ui/*/*/*", "!@material-ui/core/test-utils/*"]
}
],
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/quotes": ["error", "single"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true
}
],
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": true,
"variables": true,
"typedefs": true
}
],
"jsdoc/check-alignment": "error",
"jsdoc/check-param-names": "error",
"jsdoc/check-tag-names": "error",
"react-hooks/exhaustive-deps": "off",
"jsdoc/check-types": "error",
"jsdoc/implements-on-classes": "error",
"jsdoc/newline-after-description": "error",
"jsdoc/no-undefined-types": "error",
"jsdoc/require-description-complete-sentence": "error",
"jsdoc/require-hyphen-before-param-description": "error",
"jsdoc/require-jsdoc": "error",
"jsdoc/require-param": "error",
"jsdoc/require-param-description": "error",
"jsdoc/require-param-name": "error",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns": "error",
"jsdoc/require-returns-check": "error",
"jsdoc/require-returns-description": "error",
"jsdoc/require-returns-type": "off",
"jsdoc/valid-types": "error",
"indent": ["error", 2],
"semi": ["error", "always"],
"no-console": [
"error",
{
"allow": ["warn", "error", "log"]
}
],
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "none",
"ignoreRestSiblings": false
}
],
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/click-events-have-key-events": "off",
"react/prop-types": "off",
"react/destructuring-assignment": "off",
"react/no-unused-prop-types": "error",
"react/jsx-props-no-spreading": "off",
"react/require-default-props": [
"error",
{
"forbidDefaultForRequired": true
}
],
"react/jsx-filename-extension": [
"warn",
{
"extensions": [".ts", ".tsx"]
}
],
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
},
"overrides": [
{
// enable the rule specifically for TypeScript files
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": ["off"]
}
}
]
}