-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
125 lines (118 loc) · 4.23 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
//https://eslint.org/docs/rules/ for enabled rules for eslint:recommended and --fix rules
{
"env": {
"es6": true, // ignore ES6 globals
"node": true, // ignore node globals
"mocha": true // ignore mocha globals (describe, it)
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module"
},
"rules": {
//Overrides "eslint:recommended"
"no-console": 0, // allow use of console functions
//Add the rules associated with --fix not covered by "eslint:recommended" so we highlight them
//during pre-test script
//Possible Errors
"no-extra-parens": "error",
//"valid-jsdoc": "error",
//Best Practices
// "curly": "error",
//"dot-location": "error",
"dot-notation": "error",
"eqeqeq": "error",
//"no-else-return": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-multi-spaces": "error",
"no-useless-return": "error",
"wrap-iife": "error",
"yoda": "error",
//Strict Mode
//"strict": "error",
//Variables
"no-undef-init": "error",
//Stylistic
//"array-bracket-newline": "error",
"array-bracket-spacing": "error",
//"array-element-newline": "error",
"block-spacing": "error",
"brace-style": "error",
//"capitalized-comments": "error",
"comma-dangle": "error",
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"eol-last": "error",
"func-call-spacing": "error",
//"function-paren-newline": "error",
"implicit-arrow-linebreak": "error",
"indent": ["error", 4, { // use 4 spaces for indents
"SwitchCase": 1 // indent case within switch
}],
"key-spacing": "error",
"keyword-spacing": "error",
"linebreak-style" : 0, // mixed environment let git config enforce line endings
"lines-around-comment": "error",
"lines-between-class-members": "error",
//"multiline-comment-style": "error",
"new-parens": "error",
"newline-per-chained-call": "error",
"no-lonely-if": "error",
"no-multiple-empty-lines": ["error", {
"max": 1 // enforce single empty line max
}],
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": "error",
"object-curly-newline": ["error", { "consistent": true }],
"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
"one-var": ["error", "consecutive"],
"one-var-declaration-per-line": "error",
"operator-assignment": "error",
"operator-linebreak": "error",
//"padded-blocks": ["error"],
"padding-line-between-statements": "error",
"prefer-object-spread": "error",
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"semi-spacing": "error",
"semi-style": "error",
//"sort-vars": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", "never"],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"switch-colon-spacing": "error",
"template-tag-spacing": "error",
"unicode-bom": "error",
"wrap-regex": "error",
//ECMAScript6
"arrow-body-style": "error",
"arrow-parens": "error",
"arrow-spacing": "error",
"generator-star-spacing": "error",
"no-confusing-arrow": "error",
"no-useless-computed-key": "error",
"no-useless-rename": "error",
"no-var": "error",
//"object-shorthand": "error", //haven't implemented this yet
//"prefer-arrow-callback": "error", //we have not full moved to arrow functions
//"prefer-const": "error", //use in future, already 179 errors (only 51 fixable)
"prefer-numeric-literals": "error",
"prefer-spread": "error",
//"prefer-template": "error", //issues with string concatenation in logging
"rest-spread-spacing": "error",
"sort-imports": "error",
"template-curly-spacing": "error",
"yield-star-spacing": "error"
}
}