-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
53 lines (53 loc) · 1.84 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
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"airbnb",
"airbnb-typescript",
"prettier"
],
"parser": "@typescript-eslint/parser",
"plugins": ["react", "react-hooks", "@typescript-eslint", "prefer-arrow-functions"],
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"prefer-arrow-functions/prefer-arrow-functions": "error",
// Force jsDoc.
"require-jsdoc": [
"error",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": false,
"ClassDeclaration": true,
"ArrowFunctionExpression": true,
"FunctionExpression": true
}
}
],
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
// Force `destructuring`
"prefer-destructuring": ["error", { "object": true, "array": true }],
"no-constant-condition": ["error", { "checkLoops": false }],
"no-continue": "off",
"no-plusplus": "off",
// Esbuild resolver is smart. You don't need to be verbose.
"import/extensions": "off",
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
"no-console": "error",
"@typescript-eslint/no-inferrable-types": "off",
"no-restricted-exports": "off",
"react/require-default-props": "off",
"import/prefer-default-export": "off",
"no-underscore-dangle": ["error", { "allowAfterThis": true }]
}
}