This repository has been archived by the owner on May 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc
67 lines (61 loc) · 1.55 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
60
61
62
63
64
65
66
67
// Sublime config instructions:
//
// * start from https://medium.com/@dan_abramov/lint-like-it-s-2015-6987d44c5b48
// * then see https://github.com/yannickcr/eslint-plugin-react
//
// Known to work well with following versions:
//
// * [email protected]
// * [email protected]
//
// You may need `/* eslint no-var: 0 */` comment for es5 files
//
{
"extends": [
"eslint:recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true
},
"globals": {
"Promise": false,
},
"rules": {
// possible errors
// best practices
"eqeqeq": 0,
"no-eval": 0,
"no-self-compare": 2,
"no-unused-expressions": 0, // to allow f && f() constructions
"wrap-iife": 2,
"yoda": [2, "never"],
// strict mode
"strict": [2, "never"],
// variables
"no-shadow": 0, // to allow shadowing of commonly used vars, e.g. err, cb, etc.
"no-undef-init": 2,
"no-unused-vars": [2, {"vars": "all", "args": "none"}], // args can be provided for information reasons
// node.js
// stylistic
"brace-style": [2, "stroustrup", { "allowSingleLine": true }],
"comma-style": [2, "last"],
"eol-last": 2,
"indent": [2, 2, {"SwitchCase": 1}],
"jsx-quotes": [2, "prefer-single"],
"keyword-spacing": 2,
"new-cap": [2, {newIsCap: true, capIsNew: false}],
"no-lonely-if": 2,
"quotes": [2, "single", "avoid-escape"],
"semi": [2, "never"],
"space-before-blocks": [2, "always"],
// es6
"no-var": 2
}
}