-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
28 lines (28 loc) · 1.64 KB
/
.eslintrc.json
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
{
"env": {
"browser": true, // Allow to use browser defined variable (not console, alert etc.)
"node": true, // Allow to use node defined variable (require, process etc.)
"es6": true // Allow to use class semantics
},
"parserOptions": {
"ecmaVersion": 6, // Allow to use class semantics
"sourceType": "module" // Allow to use import/export
},
"extends": "eslint:recommended", // Implement recommended rules
"rules": {
"curly": ["error", "all"], // Error for no curly brancket in loop or conditions
"no-unused-vars": // Error for unused variables, not detect arguments
["error", {"args": "none"}],
"no-undef": "error", // Error for unused variable (that will become global variable)
"new-cap": "error", // Error for lowercase first letter or constructor call as function
"eqeqeq": ["error", "always"], // Error for ==, != to compare
"no-use-before-define": // Error for using variable before definition
["error", {"functions":false, "classes":false}],
"comma-dangle": ["error", "never"], // Error for trailing comma
"block-scoped-var": "warn", // Warn var declaration inside block scope
"no-useless-escape": "off", // Allow unnessesary escape charactors
"no-extra-boolean-cast": "off", // Allow to use boolean cast for boolean value
"no-mixed-spaces-and-tabs": "off", // Allow to use spaces and tabs for indent
"dot-notation": "off" // Allow object access via obj["name"]
}
}