|
1 | 1 | module.exports = {
|
| 2 | + env: { |
| 3 | + node: true, |
| 4 | + es6: true, |
| 5 | + }, |
| 6 | + rules: { |
| 7 | + 'accessor-pairs': 'error', |
| 8 | + 'array-bracket-spacing': ['error', 'never'], |
| 9 | + 'array-callback-return': 'off', |
| 10 | + 'arrow-body-style': 'error', |
| 11 | + 'arrow-parens': 'error', |
| 12 | + 'arrow-spacing': 'error', |
| 13 | + 'block-scoped-var': 'off', |
| 14 | + 'block-spacing': 'off', |
| 15 | + 'brace-style': [ |
| 16 | + 'error', |
| 17 | + '1tbs', |
| 18 | + { |
| 19 | + allowSingleLine: true, |
| 20 | + }, |
| 21 | + ], |
| 22 | + camelcase: [ |
| 23 | + 'error', |
| 24 | + { |
| 25 | + properties: 'never', |
| 26 | + }, |
| 27 | + ], |
| 28 | + 'capitalized-comments': 'off', |
| 29 | + 'class-methods-use-this': 'error', |
| 30 | + 'comma-dangle': 'off', |
| 31 | + 'comma-spacing': 'off', |
| 32 | + 'comma-style': ['error', 'last'], |
| 33 | + complexity: 'error', |
| 34 | + 'computed-property-spacing': ['error', 'never'], |
| 35 | + 'consistent-return': 'off', |
| 36 | + 'consistent-this': 'off', |
| 37 | + curly: 'error', |
| 38 | + 'default-case': 'off', |
| 39 | + 'dot-location': ['error', 'property'], |
| 40 | + 'dot-notation': 'error', |
| 41 | + 'eol-last': 'error', |
| 42 | + eqeqeq: 'off', |
| 43 | + 'func-call-spacing': 'error', |
| 44 | + 'func-name-matching': 'error', |
| 45 | + 'func-names': 'off', |
| 46 | + 'func-style': ['error', 'declaration'], |
| 47 | + 'generator-star-spacing': 'error', |
| 48 | + 'global-require': 'off', |
| 49 | + 'guard-for-in': 'off', |
| 50 | + 'handle-callback-err': 'off', |
| 51 | + 'id-blacklist': 'error', |
| 52 | + 'id-length': 'off', |
| 53 | + 'id-match': 'error', |
| 54 | + 'init-declarations': 'off', |
| 55 | + 'jsx-quotes': 'error', |
| 56 | + 'key-spacing': 'error', |
| 57 | + 'keyword-spacing': [ |
| 58 | + 'error', |
| 59 | + { |
| 60 | + after: true, |
| 61 | + before: true, |
| 62 | + }, |
| 63 | + ], |
| 64 | + 'line-comment-position': 'off', |
| 65 | + 'linebreak-style': ['error', 'unix'], |
| 66 | + 'lines-around-comment': 'error', |
| 67 | + 'lines-around-directive': 'error', |
| 68 | + 'max-depth': 'error', |
| 69 | + 'max-len': 'off', |
| 70 | + 'max-lines': 'off', |
| 71 | + 'max-nested-callbacks': 'error', |
| 72 | + 'max-params': 'off', |
| 73 | + 'max-statements': 'off', |
| 74 | + 'max-statements-per-line': 'off', |
| 75 | + 'multiline-ternary': 'off', |
| 76 | + 'new-cap': 'error', |
| 77 | + 'new-parens': 'error', |
| 78 | + 'newline-after-var': 'off', |
| 79 | + 'newline-before-return': 'off', |
| 80 | + 'newline-per-chained-call': 'off', |
| 81 | + 'no-alert': 'error', |
| 82 | + 'no-array-constructor': 'error', |
| 83 | + 'no-await-in-loop': 'error', |
| 84 | + 'no-bitwise': 'off', |
| 85 | + 'no-caller': 'error', |
| 86 | + 'no-catch-shadow': 'off', |
| 87 | + 'no-compare-neg-zero': 'error', |
| 88 | + 'no-confusing-arrow': 'error', |
| 89 | + 'no-continue': 'off', |
| 90 | + 'no-div-regex': 'error', |
| 91 | + 'no-duplicate-imports': 'error', |
| 92 | + 'no-else-return': 'off', |
| 93 | + 'no-empty-function': 'off', |
| 94 | + 'no-eq-null': 'off', |
| 95 | + 'no-eval': 'error', |
| 96 | + 'no-extend-native': 'error', |
| 97 | + 'no-extra-bind': 'error', |
| 98 | + 'no-extra-label': 'error', |
| 99 | + 'no-extra-parens': 'off', |
| 100 | + 'no-floating-decimal': 'error', |
| 101 | + 'no-implicit-globals': 'error', |
| 102 | + 'no-implied-eval': 'error', |
| 103 | + 'no-inline-comments': 'off', |
| 104 | + 'no-inner-declarations': ['error', 'functions'], |
| 105 | + 'no-invalid-this': 'off', |
| 106 | + 'no-iterator': 'error', |
| 107 | + 'no-label-var': 'error', |
| 108 | + 'no-labels': 'error', |
| 109 | + 'no-lone-blocks': 'error', |
| 110 | + 'no-lonely-if': 'error', |
| 111 | + 'no-loop-func': 'error', |
| 112 | + 'no-magic-numbers': 'off', |
| 113 | + 'no-mixed-requires': 'error', |
| 114 | + 'no-multi-assign': 'off', |
| 115 | + 'no-multi-spaces': 'error', |
| 116 | + 'no-multi-str': 'error', |
| 117 | + 'no-multiple-empty-lines': 'error', |
| 118 | + 'no-native-reassign': 'error', |
| 119 | + 'no-negated-condition': 'off', |
| 120 | + 'no-negated-in-lhs': 'error', |
| 121 | + 'no-nested-ternary': 'error', |
| 122 | + 'no-new': 'error', |
| 123 | + 'no-new-func': 'error', |
| 124 | + 'no-new-object': 'error', |
| 125 | + 'no-new-require': 'error', |
| 126 | + 'no-new-wrappers': 'error', |
| 127 | + 'no-octal-escape': 'error', |
| 128 | + 'no-param-reassign': 'off', |
| 129 | + 'no-path-concat': 'error', |
| 130 | + 'no-plusplus': [ |
| 131 | + 'error', |
| 132 | + { |
| 133 | + allowForLoopAfterthoughts: true, |
| 134 | + }, |
| 135 | + ], |
| 136 | + 'no-process-env': 'off', |
| 137 | + 'no-process-exit': 'error', |
| 138 | + 'no-proto': 'error', |
| 139 | + 'no-prototype-builtins': 'off', |
| 140 | + 'no-restricted-globals': 'error', |
| 141 | + 'no-restricted-imports': 'error', |
| 142 | + 'no-restricted-modules': 'error', |
| 143 | + 'no-restricted-properties': 'error', |
| 144 | + 'no-restricted-syntax': 'error', |
| 145 | + 'no-return-assign': 'error', |
| 146 | + 'no-return-await': 'error', |
| 147 | + 'no-script-url': 'error', |
| 148 | + 'no-self-compare': 'error', |
| 149 | + 'no-sequences': 'error', |
| 150 | + 'no-shadow': 'off', |
| 151 | + 'no-shadow-restricted-names': 'error', |
| 152 | + 'no-spaced-func': 'error', |
| 153 | + 'no-sync': 'error', |
| 154 | + 'no-tabs': 'error', |
| 155 | + 'no-template-curly-in-string': 'error', |
| 156 | + 'no-ternary': 'off', |
| 157 | + 'no-throw-literal': 'error', |
| 158 | + 'no-trailing-spaces': 'error', |
| 159 | + 'no-undef-init': 'error', |
| 160 | + 'no-undefined': 'off', |
| 161 | + 'no-underscore-dangle': 'off', |
| 162 | + 'no-unmodified-loop-condition': 'error', |
| 163 | + 'no-unneeded-ternary': 'error', |
| 164 | + 'no-unused-expressions': 'error', |
| 165 | + 'no-unused-vars': [ |
| 166 | + 'error', |
| 167 | + { |
| 168 | + args: 'none', |
| 169 | + }, |
| 170 | + ], |
| 171 | + 'no-use-before-define': 'off', |
| 172 | + 'no-useless-call': 'error', |
| 173 | + 'no-useless-computed-key': 'error', |
| 174 | + 'no-useless-concat': 'error', |
| 175 | + 'no-useless-constructor': 'error', |
| 176 | + 'no-useless-escape': 'off', |
| 177 | + 'no-useless-rename': 'error', |
| 178 | + 'no-useless-return': 'error', |
| 179 | + 'no-var': 'off', |
| 180 | + 'no-void': 'error', |
| 181 | + 'no-warning-comments': 'error', |
| 182 | + 'no-whitespace-before-property': 'error', |
| 183 | + 'no-with': 'error', |
| 184 | + 'nonblock-statement-body-position': 'error', |
| 185 | + 'object-curly-newline': 'off', |
| 186 | + 'object-curly-spacing': ['error', 'never'], |
| 187 | + 'object-property-newline': 'off', |
| 188 | + 'object-shorthand': 'off', |
| 189 | + 'one-var': 'off', |
| 190 | + 'one-var-declaration-per-line': 'error', |
| 191 | + 'operator-assignment': ['error', 'always'], |
| 192 | + 'operator-linebreak': 'off', |
| 193 | + 'padded-blocks': 'off', |
| 194 | + 'prefer-arrow-callback': 'off', |
| 195 | + 'prefer-const': 'error', |
| 196 | + 'prefer-destructuring': [ |
| 197 | + 'error', |
| 198 | + { |
| 199 | + array: false, |
| 200 | + object: false, |
| 201 | + }, |
| 202 | + ], |
| 203 | + 'prefer-numeric-literals': 'error', |
| 204 | + 'prefer-promise-reject-errors': 'error', |
| 205 | + 'prefer-reflect': 'off', |
| 206 | + 'prefer-rest-params': 'off', |
| 207 | + 'prefer-spread': 'off', |
| 208 | + 'prefer-template': 'off', |
| 209 | + 'quote-props': 'off', |
| 210 | + quotes: [ |
| 211 | + 'error', |
| 212 | + 'single', |
| 213 | + { |
| 214 | + avoidEscape: true, |
| 215 | + }, |
| 216 | + ], |
| 217 | + radix: 'error', |
| 218 | + 'require-await': 'error', |
| 219 | + 'require-jsdoc': 'off', |
| 220 | + 'rest-spread-spacing': 'error', |
| 221 | + semi: 'off', |
| 222 | + 'semi-spacing': [ |
| 223 | + 'error', |
| 224 | + { |
| 225 | + after: true, |
| 226 | + before: false, |
| 227 | + }, |
| 228 | + ], |
| 229 | + 'sort-imports': 'error', |
| 230 | + 'sort-keys': 'off', |
| 231 | + 'sort-vars': 'error', |
| 232 | + 'space-before-blocks': 'error', |
| 233 | + 'space-before-function-paren': 'off', |
| 234 | + 'space-in-parens': ['error', 'never'], |
| 235 | + 'space-infix-ops': 'error', |
| 236 | + 'space-unary-ops': 'error', |
| 237 | + 'spaced-comment': ['error', 'always'], |
| 238 | + strict: 'off', |
| 239 | + 'symbol-description': 'error', |
| 240 | + 'template-curly-spacing': 'error', |
| 241 | + 'template-tag-spacing': 'error', |
| 242 | + 'unicode-bom': ['error', 'never'], |
| 243 | + 'valid-jsdoc': 'off', |
| 244 | + 'vars-on-top': 'off', |
| 245 | + 'wrap-regex': 'off', |
| 246 | + 'yield-star-spacing': 'error', |
| 247 | + yoda: ['error', 'never'], |
| 248 | + }, |
2 | 249 | parser: 'babel-eslint',
|
3 | 250 | plugins: ['prettier'],
|
4 | 251 | extends: ['plugin:prettier/recommended'],
|
|
0 commit comments