-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
65 lines (65 loc) · 2.36 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
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
// Use this file as a starting point for your project's .eslintrc.
// Copy this file, and add rule overrides as needed.
// the base style guide for this project is Airbnb
// see: https://github.com/airbnb/javascript
module.exports = {
"extends": "airbnb-base",
"env": {
"es6": true
},
"globals": {
"window": true,
"document": true,
"d3": true,
"$": true,
"jQuery": true
},
// overrides to the Airbnb style follow
"rules": {
// indentation should be 4 spaces (use soft tabs) and switch cases should be indented
"indent": [2, 4, {
"SwitchCase": 1
}],
// also set the tab width for the max line width with a max length of 100
"max-len": [1, 160, {"tabWidth": 4}],
// do not allow dangling commas at the end of arrays, objects, etc.
"comma-dangle": [2, "never"],
// downgrade extra semicolons to warnings
"no-extra-semi": [1],
// require parens in arrow functions with single arguments for improved readability
"arrow-parens": [2, "always"],
// allow double-quoted strings
"quotes": [0],
// allow for loops
"no-restricted-syntax": [2, "LabeledStatement", "WithStatement"],
// require stroustrup brace styles
"brace-style": [1, "stroustrup"],
// downgrading export default preference to warning, since we may add additional exports
// to files in the future
"import/prefer-default-export": [1],
"no-underscore-dangle": [0, {
"allowAfterThis": true
}],
// allow ++ and -- in for loops
"no-plusplus": [2, {
"allowForLoopAfterthoughts": true
}],
// allow continue statements
"no-continue": [0],
// allow named exports in files with default exports in order to expose containers
// for testing
"import/no-named-as-default": [0],
// don't require all function arguments be on new lines
"function-paren-newline": [0],
// ignore jsdoc
"spaced-comment": ["error", "always", {
"exceptions": ["*"]
}],
// for now, don't do destructuring
"prefer-destructuring": [0],
// allow some globals
"no-restricted-globals": [0],
"prefer-const": "error",
"no-param-reassign": "off"
}
}