-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc
55 lines (53 loc) · 1.99 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
//
// ESLint Configuration for generator-node-npm
//
// author: @iMauricio
// date: 3/18/2015
//
// Helpful resources:
//
// - rules: http://eslint.org/docs/rules/
// - configuration: http://eslint.org/docs/configuring/
//
// temporarily disable warnings
// /*eslint-disable */
// ...
// /*eslint-enable */
{
// check http://eslint.org/docs/configuring/#specifying-language-options
"ecmaFeatures": {
"generators": false
},
"parser": "espree",
"env": {
"node": true,
"mocha": true,
"browser": false // true in the case it's module which will be bundled
},
// if the module needs globals set them here
"globals": {},
// 0 - turn the rule off
// 1 - turn the rule on as a warning (doesn't affect exit code)
// 2 - turn the rule on as an error (exit code is 1 when triggered)
"rules": {
"yoda": 0, // allow non-literals to be first in comparison expressions
"no-console": 0, // disallow use of console (off by default in the node environment)
"no-trailing-spaces": 0, // disable throwing errors for trailing spaces
"no-unused-expressions": 0, // disallow usage of expressions in statement position
"quotes": [2, "single"], // specify whether double or single quotes should be used
"strict": [2, "global"], // controls location of Use Strict Directives
"no-unused-vars": [1, {
"vars": "all",
"args": "after-used"
}],
"no-shadow": 0, // disallow declaration of variables already declared in the outer scope
"eol-last": 0, // enforce newline at the end of file, with no multiple empty lines
"indent": [2, 2], // this option sets a specific tab width for your code
"space-before-function-parentheses": [
2, {
"anonymous": "always",
"named": "never"
}
]
}
}