-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
50 lines (50 loc) · 1.18 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
{
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier",
"prettier/react"
],
"plugins": [
"prettier",
"react",
"class-property",
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true,
},
"ecmaVersion": 2017,
"sourceType": "module", // es6 import/export
},
"env": {
"es6": true,
"browser": true,
},
"globals": {
"module": true,
},
"rules": {
"prettier/prettier": [
"error",
{
"semi": true,
"useTabs": false,
"tabWidth": 2,
"printWidth": 80,
"singleQuote": true,
"bracketSpacing": true,
"trailingComma": "all",
"jsxBracketSameLine": false,
},
],
"eqeqeq": ["error", "always"], // adding some custom ESLint rules
"no-var": ["error"], // never use "var", use "let" or "const" instead
"object-curly-spacing": ["error", "always"], // good: const { a } = b; wrong: const {a} = b;
"react/display-name": "off",
"no-console": ["error", { "allow": ["error", "warn"] }],
"react/prop-types": ["error", { skipUndeclared: true }],
},
}