-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
87 lines (87 loc) · 2.61 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
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
// Allows for the parsing of JSX
"jsx": true
}
},
"plugins": ["import", "prefer-arrow"],
"ignorePatterns": ["node_modules/**/*"],
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended",
"prettier"
],
"rules": {
"prettier/prettier": ["error", {
"semi": false,
"singleQuote": false,
"printWidth": 100,
"trailingComma": "none",
"arrowParens": "avoid",
"endOfLine": "auto"
}],
// Can break code with auto-fix option, we are checking it separately (see package.json lint-hooks script)
"react-hooks/exhaustive-deps": 0,
"no-console": [
"warn",
{
"allow": ["error"]
}
],
"no-alert": "error",
"no-debugger": "error",
"import/no-extraneous-dependencies": ["error", { "devDependencies": false }],
"react/prop-types": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "warn",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"prefer-promise-reject-errors": "error",
"prefer-const": ["error", {
"destructuring": "all",
"ignoreReadBeforeAssign": false
}],
"import/extensions": ["error", {"tsx": "never", "json": "always", "scss": "always"}],
"import/no-unresolved": "off", // does not work with foo/index.ts
"import/imports-first": ["error", "absolute-first"],
"no-bitwise": "error",
"@typescript-eslint/no-shadow": "error",
"no-array-constructor": "error",
"no-caller": "error",
"no-class-assign": "error",
"no-cond-assign": "error",
"no-useless-escape": "error",
"no-useless-return": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-unused-expressions": "error",
"arrow-body-style": ["error", "as-needed"],
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
],
"@typescript-eslint/no-var-requires": "error",
"react/jsx-props-no-spreading": "off",
"no-implicit-coercion": ["error", {"boolean": false}],
"no-param-reassign": ["error", {"props": true}],
"no-process-env": "error"
}
}