Repository navigation
Expand file tree
/
Copy path.eslintrc
More file actions
65 lines (52 loc) · 1.35 KB
/
Copy path.eslintrc
File metadata and controls
65 lines (52 loc) · 1.35 KB
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
{
/*
* ENVIRONMENTS
* =================
*/
"env": {
"commonjs": false,
"es6": true,
"node": true,
"browser": true
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 7,
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
/*
* ENFORCING OPTIONS
* =================
*/
// Force all variable names to use either camelCase style or UPPER_CASE
// with underscores.
"camelcase": "warn",
// Prohibit use of == and != in favor of === and !==.
"eqeqeq": "error",
// Prohibit use of a variable before it is defined.
"no-use-before-define": "error",
// Enforce line length to 120 characters
"max-len": ["error", 120],
// Require capitalized names for constructor functions.
"new-cap": "error",
// Enforce use of single quotation marks for strings.
"quotes": ["error", "single"],
// Prohibit use of explicitly undeclared variables.
"no-undef": "error",
// Warn when variables are defined but never used.
"no-unused-vars": "warn",
"no-var": "error",
"no-duplicate-imports": "error",
/*
* RELAXING OPTIONS
* =================
*/
// Suppress warnings about == null comparisons.
"no-eq-null": "off"
}
}