-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
49 lines (47 loc) · 1.55 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
{
"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/ban-types": "off"
}
}