-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
83 lines (83 loc) · 2.69 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
es6: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier",
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
process: "readonly",
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
},
sourceType: "module",
},
plugins: ["react", "@typescript-eslint", "prettier"],
rules: {
"prettier/prettier": "error",
"react/jsx-indent-props": ["error", "first"],
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
"react/forbid-elements": ["error", { forbid: ["b", "font"] }],
"react/prop-types": ["error", { ignore: ["form", "match", "history"] }],
"react-hooks/exhaustive-deps": "error",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "react",
"importNames": ["default"],
"message": "default-importing React is not necessary",
}
]
}
],
"no-prototype-builtins": "off",
"react/display-name": "off",
"linebreak-style": ["error", "unix"],
semi: ["error", "always"],
"semi-spacing": ["error"],
"no-var": ["error"],
"prefer-const": ["error"],
eqeqeq: ["error"],
"max-len": ["error", { code: 124, tabWidth: 2, ignoreComments: true, ignoreTemplateLiterals: true }],
"no-trailing-spaces": ["error"],
"space-before-blocks": ["error", "always"],
"eol-last": ["error", "always"],
"no-restricted-globals": ["error", "event"],
"brace-style": ["error", "1tbs"],
camelcase: ["error", { properties: "never" }],
"space-infix-ops": ["error"],
"keyword-spacing": ["error", { before: true, after: true }],
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "always-multiline",
},
],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
settings: {
react: {
version: "detect",
},
},
};