-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
82 lines (72 loc) · 2.04 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/**
* ESLint rules by which to lint the JavaScript files.
* http://eslint.org/docs/rules/
*/
module.exports = {
"extends": [
"eslint:recommended"
],
"plugins": [
"import"
],
"env": {
"node": true,
"es6": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"impliedStrict": true,
"experimentalObjectRestSpread": true
}
},
"rules": {
// Possible Errors
"no-console": "off",
// Best Practices
"default-case": "off",
"no-empty-function": "error",
"vars-on-top": "warn",
"wrap-iife": ["error", "outside"],
// Strict Mode
"strict": "off",
// Variables
"no-use-before-define": ["error", {"functions": false, "classes": true}],
// Node.js and CommonJS
"global-require": "off",
"handle-callback-err": "warn",
// Stylistic Issues
"comma-dangle": ["warn", "always"],
"eol-last": "off",
"func-names": "off",
"indent": ["warn", 2, { "SwitchCase": 1 }],
"max-depth": ["warn", 6],
"max-len": "off",
"newline-before-return": "off",
"no-bitwise": "off",
"no-mixed-operators": "off",
"no-plusplus": "off",
"quotes": ["warn", "single"],
// ECMAScript 6
"arrow-body-style": ["warn", "always"],
"arrow-parens": ["warn", "always"],
"arrow-spacing": "warn",
"no-duplicate-imports": "error",
"no-useless-constructor": "warn",
//"object-shorthand": ["warn", "never"],
// Deviations from our baseline coding standards
"object-curly-spacing": ["warn", "never"],
"no-underscore-dangle": ["warn", {"allow": ["_id", "_deleted", "_rev", "_args"]}], // Required by Cloudant and dashdash
"linebreak-style": "off",
"class-methods-use-this": "off",
"no-param-reassign": "off",
"no-else-return": "off",
// Temporary deviations until we can fix all these problems
"valid-jsdoc": "off",
// React and JSX
"react/prefer-stateless-function": "off",
"react/jsx-filename-extension": "off",
"jsx-a11y/no-static-element-interactions": "off",
}
};