1+ //https://eslint.org/docs/rules/ for enabled rules for eslint:recommended and --fix rules
2+ {
3+ "env": {
4+ "es6": true, // ignore ES6 globals
5+ "node": true, // ignore node globals
6+ "mocha": true // ignore mocha globals (describe, it)
7+ },
8+ "extends": "eslint:recommended",
9+ "parserOptions": {
10+ "ecmaVersion": 6,
11+ "sourceType": "module"
12+ },
13+ "rules": {
14+ //Overrides "eslint:recommended"
15+ "no-console": 0, // allow use of console.log
16+
17+ //Add the rules associated with --fix not covered by "eslint:recommended" so we highlight them
18+ //during pre-test script
19+
20+ //Possible Errors
21+ "no-extra-parens": "error",
22+ //"valid-jsdoc": "error",
23+
24+ //Best Practices
25+ // "curly": "error",
26+ //"dot-location": "error",
27+ "dot-notation": "error",
28+ "eqeqeq": "error",
29+ //"no-else-return": "error",
30+ "no-extra-bind": "error",
31+ "no-extra-label": "error",
32+ "no-floating-decimal": "error",
33+ "no-implicit-coercion": "error",
34+ "no-multi-spaces": "error",
35+ "no-useless-return": "error",
36+ "wrap-iife": "error",
37+ "yoda": "error",
38+
39+ //Strict Mode
40+ //"strict": "error",
41+
42+ //Variables
43+ "no-undef-init": "error",
44+
45+ //Stylistic
46+ //"array-bracket-newline": "error",
47+ "array-bracket-spacing": "error",
48+ //"array-element-newline": "error",
49+ "block-spacing": "error",
50+ "brace-style": "error",
51+ //"capitalized-comments": "error",
52+ "comma-dangle": "error",
53+ "comma-spacing": "error",
54+ "comma-style": "error",
55+ "computed-property-spacing": "error",
56+ "eol-last": "error",
57+ "func-call-spacing": "error",
58+ //"function-paren-newline": "error",
59+ "implicit-arrow-linebreak": "error",
60+ "indent": ["error", 4, { // use 4 spaces for indents
61+ "SwitchCase": 1 // indent case within switch
62+ }],
63+ "key-spacing": "error",
64+ "keyword-spacing": "error",
65+ "linebreak-style" : 0, // mixed environment let git config enforce line endings
66+ "lines-around-comment": "error",
67+ "lines-between-class-members": "error",
68+ //"multiline-comment-style": "error",
69+ "new-parens": "error",
70+ "newline-per-chained-call": "error",
71+ "no-lonely-if": "error",
72+ "no-multiple-empty-lines": ["error", {
73+ "max": 1 // enforce single empty line max
74+ }],
75+ "no-trailing-spaces": "error",
76+ "no-unneeded-ternary": "error",
77+ "no-whitespace-before-property": "error",
78+ "nonblock-statement-body-position": "error",
79+ "object-curly-newline": ["error", { "consistent": true }],
80+ "object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
81+ "one-var": ["error", "consecutive"],
82+ "one-var-declaration-per-line": "error",
83+ "operator-assignment": "error",
84+ "operator-linebreak": "error",
85+ //"padded-blocks": ["error"],
86+ "padding-line-between-statements": "error",
87+ "prefer-object-spread": "error",
88+ "quote-props": ["error", "as-needed"],
89+ "quotes": ["error", "single"],
90+ "semi": ["error", "always"],
91+ "semi-spacing": "error",
92+ "semi-style": "error",
93+ //"sort-vars": "error",
94+ "space-before-blocks": "error",
95+ "space-before-function-paren": ["error", "never"],
96+ "space-in-parens": "error",
97+ "space-infix-ops": "error",
98+ "space-unary-ops": "error",
99+ "spaced-comment": "error",
100+ "switch-colon-spacing": "error",
101+ "template-tag-spacing": "error",
102+ "unicode-bom": "error",
103+ "wrap-regex": "error",
104+
105+ //ECMAScript6
106+ "arrow-body-style": "error",
107+ "arrow-parens": "error",
108+ "arrow-spacing": "error",
109+ "generator-star-spacing": "error",
110+ "no-confusing-arrow": "error",
111+ "no-useless-computed-key": "error",
112+ "no-useless-rename": "error",
113+ "no-var": "error",
114+ //"object-shorthand": "error", //haven't implemented this yet
115+ //"prefer-arrow-callback": "error", //we have not full moved to arrow functions
116+ //"prefer-const": "error", //use in future, already 179 errors (only 51 fixable)
117+ "prefer-numeric-literals": "error",
118+ "prefer-spread": "error",
119+ //"prefer-template": "error", //issues with string concatenation in logging
120+ "rest-spread-spacing": "error",
121+ "sort-imports": "error",
122+ "template-curly-spacing": "error",
123+ "yield-star-spacing": "error"
124+ }
125+ }
0 commit comments