|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "node": true |
| 4 | + }, |
| 5 | + |
| 6 | + "rules": { |
| 7 | + // Possible errors |
| 8 | + "no-cond-assign": 2, |
| 9 | + "no-console": 0, |
| 10 | + "no-constant-condition": 0, |
| 11 | + "no-comma-dangle": 2, |
| 12 | + "no-control-regex": 2, |
| 13 | + "no-debugger": 2, |
| 14 | + "no-dupe-keys": 2, |
| 15 | + "no-empty": 2, |
| 16 | + "no-empty-class": 2, |
| 17 | + "no-ex-assign": 2, |
| 18 | + "no-extra-boolean-cast": 2, |
| 19 | + "no-extra-parens": 0, |
| 20 | + "no-extra-semi": 2, |
| 21 | + "no-func-assign": 2, |
| 22 | + "no-invalid-regexp": 2, |
| 23 | + "no-negated-in-lhs": 2, |
| 24 | + "no-obj-calls": 2, |
| 25 | + "no-regex-spaces": 2, |
| 26 | + "no-sparse-arrays": 2, |
| 27 | + "no-unreachable": 2, |
| 28 | + "use-isnan": 2, |
| 29 | + "valid-jsdoc": [2, { "requireReturn": false }], |
| 30 | + "valid-typeof": 2, |
| 31 | + |
| 32 | + // Best practices |
| 33 | + "block-scoped-var": 0, |
| 34 | + "complexity": 0, // TODO: enable |
| 35 | + "consistent-return": 2, |
| 36 | + "curly": [2, "all"], |
| 37 | + "dot-notation": 2, |
| 38 | + "eqeqeq": [2, "smart"], |
| 39 | + "guard-for-in": 2, |
| 40 | + "no-alert": 2, |
| 41 | + "no-caller": 2, |
| 42 | + "no-div-regex": 2, |
| 43 | + "no-else-return": 0, |
| 44 | + "no-empty-label": 2, |
| 45 | + "no-eq-null": 2, |
| 46 | + "no-eval": 2, |
| 47 | + "no-extend-native": 2, |
| 48 | + "no-fallthrough": 2, |
| 49 | + "no-floating-decimal": 2, |
| 50 | + "no-implied-eval": 2, |
| 51 | + "no-labels": 2, |
| 52 | + "no-iterator": 2, |
| 53 | + "no-lone-blocks": 2, |
| 54 | + "no-loop-func": 2, |
| 55 | + "no-multi-str": 2, |
| 56 | + "no-native-reassign": 2, |
| 57 | + "no-new": 2, |
| 58 | + "no-new-func": 2, |
| 59 | + "no-new-wrappers": 2, |
| 60 | + "no-octal": 2, |
| 61 | + "no-octal-escape": 2, |
| 62 | + "no-proto": 2, |
| 63 | + "no-redeclare": 2, |
| 64 | + "no-return-assign": 2, |
| 65 | + "no-script-url": 2, |
| 66 | + "no-self-compare": 2, |
| 67 | + "no-sequences": 2, |
| 68 | + "no-unused-expressions": 2, |
| 69 | + "no-warning-comments": 0, |
| 70 | + "no-with": 2, |
| 71 | + "no-yoda": 2, |
| 72 | + "radix": 2, |
| 73 | + "wrap-iife": [2, "inside"], |
| 74 | + |
| 75 | + // Strict mode |
| 76 | + "no-global-strict": 0, |
| 77 | + "no-extra-strict": 2, |
| 78 | + "strict": 2, |
| 79 | + |
| 80 | + // Variables |
| 81 | + "no-catch-shadow": 0, |
| 82 | + "no-delete-var": 2, |
| 83 | + "no-label-var": 2, |
| 84 | + "no-shadow": 2, |
| 85 | + "no-shadow-restricted-names": 2, |
| 86 | + "no-undef": 2, |
| 87 | + "no-undef-init": 2, |
| 88 | + "no-unused-vars": 0, |
| 89 | + "no-use-before-define": 2, |
| 90 | + |
| 91 | + // Node.js |
| 92 | + "handle-callback-err": 2, |
| 93 | + "no-mixed-requires": 2, |
| 94 | + "no-path-concat": 2, |
| 95 | + "no-process-exit": 2, |
| 96 | + "no-sync": 0, |
| 97 | + |
| 98 | + // Stylistic issues |
| 99 | + "brace-style": [2, "1tbsp"], |
| 100 | + "camelcase": 2, |
| 101 | + "consistent-this": [2, "self"], |
| 102 | + "func-names": 0, |
| 103 | + "func-style": 0, |
| 104 | + "max-nested-callbacks": 0, |
| 105 | + "new-cap": 2, |
| 106 | + "new-parens": 2, |
| 107 | + "no-nested-ternary": 0, |
| 108 | + "no-array-constructor": 2, |
| 109 | + "no-new-object": 2, |
| 110 | + "no-spaced-func": 2, |
| 111 | + "no-space-before-semi": 2, |
| 112 | + "no-ternary": 0, |
| 113 | + "no-underscore-dangle": 0, |
| 114 | + "no-wrap-func": 2, |
| 115 | + "one-var": 0, |
| 116 | + "quotes": [2, "single", "avoid-escape"], |
| 117 | + "quote-props": 0, |
| 118 | + "semi": [2, "always"], |
| 119 | + "sort-vars": 0, |
| 120 | + "space-in-brackets": 0, // TODO: enable? |
| 121 | + "space-infix-ops": 2, |
| 122 | + "space-return-throw-case": 2, |
| 123 | + "space-unary-word-ops": 2, |
| 124 | + "wrap-regex": 0, |
| 125 | + |
| 126 | + // Legacy |
| 127 | + // TODO: consider enabling some of the `max-*` rules |
| 128 | + "max-depth": 0, |
| 129 | + "max-len": 0, |
| 130 | + "max-params": 0, |
| 131 | + "max-statements": 0, |
| 132 | + "no-bitwise": 2, |
| 133 | + "no-plusplus": 0 |
| 134 | + } |
| 135 | +} |
0 commit comments