|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "node": true, |
| 4 | + "browser": true, |
| 5 | + "builtin": true |
| 6 | + }, |
| 7 | + "rules": { |
| 8 | + |
| 9 | + |
| 10 | + /** |
| 11 | + * Possible Errors |
| 12 | + */ |
| 13 | + "comma-dangle": [ 2, "always-multiline" ], |
| 14 | + "no-cond-assign": [ 2, "except-parens" ], |
| 15 | + "no-debugger": 2, |
| 16 | + "no-dupe-args": 2, |
| 17 | + "no-dupe-keys": 2, |
| 18 | + "no-duplicate-case": 2, |
| 19 | + "no-empty": 2, |
| 20 | + "no-empty-character-class": 2, |
| 21 | + "no-ex-assign": 2, |
| 22 | + "no-extra-boolean-cast": 2, |
| 23 | + // "no-extra-parens": 2, |
| 24 | + "no-extra-semi": 2, |
| 25 | + "no-irregular-whitespace": 2, |
| 26 | + "no-obj-calls": 2, |
| 27 | + "no-unexpected-multiline": 2, |
| 28 | + "no-unreachable": 2, |
| 29 | + // "valid-jsdoc": 2, |
| 30 | + "valid-typeof": 2, |
| 31 | + |
| 32 | + |
| 33 | + /** |
| 34 | + * Best Practices |
| 35 | + */ |
| 36 | + "block-scoped-var": 2, |
| 37 | + "curly": [ 2, "multi-line" ], |
| 38 | + "dot-location": [ 2, "property" ], |
| 39 | + "dot-notation": 2, |
| 40 | + "eqeqeq": [ 2, "allow-null" ], |
| 41 | + "guard-for-in": 2, |
| 42 | + "no-alert": 2, |
| 43 | + "no-caller": 2, |
| 44 | + "no-div-regex": 2, |
| 45 | + "no-else-return": 2, |
| 46 | + "no-eq-null": 2, |
| 47 | + "no-eval": 2, |
| 48 | + "no-extend-native": 2, |
| 49 | + "no-extra-bind": 2, |
| 50 | + "no-floating-decimal": 2, |
| 51 | + "no-iterator": 2, |
| 52 | + "no-labels": 2, |
| 53 | + "no-lone-blocks": 2, |
| 54 | + // "no-loop-func": 2, |
| 55 | + "no-multi-spaces": 2, |
| 56 | + "no-multi-str": 2, |
| 57 | + "no-native-reassign": 2, |
| 58 | + "no-new": 2, |
| 59 | + "no-new-func": 2, |
| 60 | + "no-new-wrappers": 2, |
| 61 | + "no-octal": 2, |
| 62 | + "no-octal-escape": 2, |
| 63 | + "no-proto": 2, |
| 64 | + "no-return-assign": [ 1, "except-parens" ], |
| 65 | + "no-script-url": 2, |
| 66 | + "no-self-compare": 2, |
| 67 | + "no-sequences": 2, |
| 68 | + "no-throw-literal": 2, |
| 69 | + "no-useless-concat": 2, |
| 70 | + "no-warning-comments": [ 1, { "location": "anywhere" }], |
| 71 | + "no-with": 2, |
| 72 | + "wrap-iife": [ 2, "inside" ], |
| 73 | + |
| 74 | + |
| 75 | + /** |
| 76 | + * Stylistic Issues |
| 77 | + */ |
| 78 | + "block-spacing": 2, |
| 79 | + "brace-style": [ 2, "1tbs", { "allowSingleLine": true }], |
| 80 | + "camelcase": [ 2, { "properties": "never" }], |
| 81 | + "comma-spacing": [ 2, { "before": false, "after": true }], |
| 82 | + "comma-style": [ |
| 83 | + 2, |
| 84 | + "first", |
| 85 | + { |
| 86 | + "exceptions": { |
| 87 | + "ArrayExpression": true, |
| 88 | + "ObjectExpression": true |
| 89 | + } |
| 90 | + } |
| 91 | + ], |
| 92 | + "computed-property-spacing": [ 2, "never" ], |
| 93 | + "eol-last": 2, |
| 94 | + "indent": [2, 2, { "SwitchCase": 1 }], |
| 95 | + "key-spacing": 2, |
| 96 | + "keyword-spacing": [ |
| 97 | + 2 |
| 98 | + ], |
| 99 | + "lines-around-comment": [ 2, { |
| 100 | + "beforeBlockComment": true, |
| 101 | + "beforeLineComment": false, |
| 102 | + "allowBlockStart": true, |
| 103 | + "allowBlockEnd": true |
| 104 | + }], |
| 105 | + "linebreak-style": [ 2, "unix" ], |
| 106 | + "new-cap": 2, |
| 107 | + "new-parens": 2, |
| 108 | + "no-array-constructor": 2, |
| 109 | + "no-lonely-if": 2, |
| 110 | + "no-mixed-spaces-and-tabs": 2, |
| 111 | + "no-multiple-empty-lines": [ 2, { "max": 3 }], |
| 112 | + "no-nested-ternary": 2, |
| 113 | + "no-new-object": 2, |
| 114 | + "no-spaced-func": 2, |
| 115 | + "no-trailing-spaces": 2, |
| 116 | + "no-unneeded-ternary": 2, |
| 117 | + "operator-linebreak": [ 2, "before" ], |
| 118 | + "quotes": [ 2, "single" ], |
| 119 | + "semi": [ 2, "always" ], |
| 120 | + "semi-spacing": 2, |
| 121 | + "space-infix-ops": 2, |
| 122 | + "space-unary-ops": 2, |
| 123 | + |
| 124 | + |
| 125 | + /** |
| 126 | + * Variables |
| 127 | + */ |
| 128 | + "no-catch-shadow": 2, |
| 129 | + "no-delete-var": 2, |
| 130 | + "no-shadow-restricted-names": 2, |
| 131 | + "no-undef-init": 2, |
| 132 | + "no-undef": 2, |
| 133 | + "no-unused-vars": 2, |
| 134 | + "no-use-before-define": [ 2, "nofunc" ], |
| 135 | + |
| 136 | + |
| 137 | + /** |
| 138 | + * Node / CommonJS |
| 139 | + */ |
| 140 | + "handle-callback-err": 2, |
| 141 | + "no-mixed-requires": [ 1, true ], |
| 142 | + "no-path-concat": 2, |
| 143 | + "no-process-exit": 2 |
| 144 | + } |
| 145 | +} |
0 commit comments