-
Notifications
You must be signed in to change notification settings - Fork 59
/
.eslintrc
59 lines (55 loc) · 1.65 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
51
52
53
54
55
56
57
58
59
{
// http://eslint.org/docs/user-guide/configuring.html
// https://gist.github.com/cletusw/e01a85e399ab563b1236
"env": {
"es2021": true, // https://eslint.org/docs/user-guide/configuring/language-options#specifying-environments
// This automatically sets the ecmaVersion parser option (parserOptions) to 12
"browser": true,
"node": true
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"plugins": [
"import"
],
// https://eslint.org/docs/latest/use/configure/configuration-files#adding-shared-settings
"settings": {
"react": {
// https://github.com/jsx-eslint/eslint-plugin-react#configuration-legacy-eslintrc
"version": "detect"
}
},
"rules": {
"import/no-unresolved": [
"error",
{
"commonjs": true,
"amd": true
}
],
// https://eslint.org/docs/latest/rules/no-restricted-globals
"no-restricted-globals": [
"error",
{
"name": "event",
"message": "Use local parameter instead."
}
],
"indent": ["error", 4, { "SwitchCase": 1, "ignoreComments": true }],
"linebreak-style": ["error", "unix"],
"semi": ["error", "always"],
// http://eslint.org/docs/rules/quotes
"quotes": "off",
"no-console": "off",
"no-debugger": "off",
"no-shadow": "off"
}
}