forked from botpress/botpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
74 lines (55 loc) · 2.84 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
68
69
70
71
72
73
{
// http://eslint.org/docs/rules/
"parser": "babel-eslint",
"env": {
"browser": true, // browser global variables.
"node": true, // Node.js global variables and Node.js-specific rules.
"worker": false, // web workers global variables.
"amd": false, // defines require() and define() as global variables as per the amd spec.
"mocha": false, // adds all of the Mocha testing global variables.
"jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0.
"phantomjs": false, // phantomjs global variables.
"jquery": false, // jquery global variables.
"prototypejs": false, // prototypejs global variables.
"shelljs": false, // shelljs global variables.
"meteor": false, // meteor global variables.
"mongo": false, // mongo global variables.
"applescript": false, // applescript global variables.
"es6": true, // enable all ECMAScript 6 features except for modules.
},
"globals": {
"goog": true
},
"plugins": [
// e.g. "react" (must run `npm install eslint-plugin-react` first)
],
"rules": {
// Possible Errors
"no-extra-semi": 1, // disallow unnecessary semicolons
"no-inner-declarations": 2, // disallow function or variable declarations in nested blocks
// Best Practices
"curly": 2, // specify curly brace conventions for all control statements
"no-eval": 2, // disallow use of eval()
"no-extend-native": 2, // disallow adding to native types
"no-new-wrappers": 2, // disallows creating new instances of String, Number, and Boolean
"no-with": 2, // disallow use of the with statement
// Strict Mode
// Variables
"no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block
// Node.js
// Stylistic Issues
"array-bracket-spacing": [2, "never"], // enforce spacing inside array brackets (off by default)
"indent": [2, 2], // this option sets a specific tab width for your code (off by default)
"no-array-constructor": 2, // disallow use of the Array constructor
"no-mixed-spaces-and-tabs": 2, // disallow mixed spaces and tabs for indentation
"no-new-object": 2, // disallow use of the Object constructor
"object-curly-spacing": ["warn", "always"], // require or disallow padding inside curly braces (off by default)
"semi": ["warn", "never"], // require or disallow use of semicolons instead of ASI
"no-multi-spaces": ["warn"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"block-spacing": ["error"],
// ECMAScript 6
// Legacy
"max-len": ["error", 120, { ignoreRegExpLiterals: true }]
}
}