-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
50 lines (48 loc) · 1.6 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"rules": {
// TypeScript does the type checking. Turning this off avoids
// some false positives with the FunctionComponent generics
"react/prop-types": "off",
// This pattern avoids eslint checks for arguments that begin
// with an underscore, while keeping the no-unused-vars rule.
// It is mostly used in unused function arguments, such as
// event handlers where the event is not needed, eg.
// onClick: (_: React.SyntheticEvent) => { /* do something */ }
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
// Module boundary means input and output for all exports must
// be explicit. This also means that every exported React Component
// should explicitly have a : JSX.Element as a return type.
// This is too bothersome. So, turning this rule off
"@typescript-eslint/explicit-module-boundary-types": "off",
// Disables the warning using the no null assertion
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off"
}
}