-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
36 lines (35 loc) · 1.13 KB
/
.eslintrc.js
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
module.exports = {
/**
* ESLint: http://eslint.org/docs/user-guide/configuring
*/
// "env:" supplies predefined global variables
'env': {
'browser': true,
'es6': true,
'node': true,
'mocha': true,
'mongo': true,
'jquery': true
},
'globals': {
'supertest': true,
'expect': true
},
// our configuration extends the recommended base configuration
'extends': 'eslint:recommended',
// define the type of file `script` or `module` for ES6 Modules
'parserOptions': {
'sourceType': 'module'
},
//ESLint rules: Severity Levels: off = 0 | warn = 1 | error = 2
'rules': {
'strict': ['error', 'safe'], //prefer `'use-strict';` pragma
'eqeqeq': 'error', //prefer strict equality `===`
'no-console': 'warn', //allows but warn about console like `console.log()`
'no-unused-vars': 'warn', //warns about unused variables
'no-eval': 'error', //disallows `eval()` usage
'indent': ['error', 2], //enforce 2 space indents (not tabs)
'quotes': ['error', 'single'], //prefer single quotes over double quotes
'semi': ['error', 'always'] //enforce semi-colon usage
}
};