-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
28 lines (28 loc) · 1.43 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
{
"parser": "babel-eslint",
"env": {
"node": true,
"mocha": true
},
// http://eslint.org/docs/user-guide/configuring.html#configuring-rules
// https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb/rules
"rules": {
"brace-style": [2, "1tbs", { "allowSingleLine": true }], // braces on same line, allows one line statements
"comma-dangle": [2, "never"], // no trailing commas
"curly": [1], // require braces
"default-case": 2, // require default case in switch statements
"no-extra-bind": 2, // disallow unnecessary function binding
"eqeqeq": [2, "smart"], // require the use of === and !==
"guard-for-in": 2, // make sure for-in loops have an if statement
"no-alert": 2, // disallow the use of alert, confirm, and prompt
"no-cond-assign": [2, "except-parens"], // stop accidental assignments when comparisions are meant
"no-floating-decimal": 2, // disallow the use of leading or trailing decimal points in numeric literals
"no-trailing-spaces": 2, // disallow trailing whitespace at the end of lines
"no-with": 2, // disallow use of the with statement
"no-unused-vars": [1], // disallow unused variables
"radix": 2, // require use of the second argument for parseInt()
"semi": [2, "always"], // always require semicolons
"space-infix-ops": 2, // require spaces around operators
"yoda": 2 // disallow Yoda conditions eg if (value == variable)
}
}