-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
48 lines (45 loc) · 989 Bytes
/
.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
module.exports = {
"root": true,
"parser": "babel-eslint",
"env": {
"browser": true,
"react-native/react-native": true
},
"plugins": [
"react",
"react-native",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"globals": { //define the globals here
"__DEV__": true,
"require": true,
"module": true,
"Promise": true,
"test": true,
"expect": true
},
"rules": {
//general
"comma-dangle": ["error", "always-multiline"],
//react plugin
"react/no-string-refs": 0,
"react/display-name": 0,
"react/prop-types": 0,
//style
"no-multi-spaces": 1,
"array-bracket-spacing": ["error", "never"],
"indent": ["error", 4],
"max-len": ["error", 180],
"no-trailing-spaces": 1,
"semi": ["error", "always"],
"indent": ["error", "tab", { "SwitchCase": 1 }],
//variables
"no-undef": 1,
"no-unused-vars": 2,
"no-shadow": 1,
}
};