|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "es6": true, |
| 4 | + "node": true |
| 5 | + }, |
| 6 | + "extends": "eslint:recommended", |
| 7 | + "globals": { |
| 8 | + "angular": false |
| 9 | + }, |
| 10 | + "rules": { |
| 11 | + "semi": [ |
| 12 | + "error", |
| 13 | + "always" |
| 14 | + ], |
| 15 | + "valid-jsdoc": [ |
| 16 | + "warn", |
| 17 | + { |
| 18 | + "matchDescription": ".*", |
| 19 | + "requireParamDescription": false, |
| 20 | + "requireReturn": false, |
| 21 | + "requireReturnDescription": false |
| 22 | + } |
| 23 | + ], |
| 24 | + "block-scoped-var": [ |
| 25 | + "error" |
| 26 | + ], |
| 27 | + "complexity": [ |
| 28 | + "warn", |
| 29 | + 10 |
| 30 | + ], |
| 31 | + "default-case": [ |
| 32 | + "error" |
| 33 | + ], |
| 34 | + "dot-location": [ |
| 35 | + "error", |
| 36 | + "property" |
| 37 | + ], |
| 38 | + "dot-notation": [ |
| 39 | + "error" |
| 40 | + ], |
| 41 | + "eqeqeq": [ |
| 42 | + "error", |
| 43 | + "always" |
| 44 | + ], |
| 45 | + "no-alert": [ |
| 46 | + "error" |
| 47 | + ], |
| 48 | + "no-console": [ |
| 49 | + "warn" |
| 50 | + ], |
| 51 | + "no-debugger": [ |
| 52 | + "warn" |
| 53 | + ], |
| 54 | + "no-caller": [ |
| 55 | + "error" |
| 56 | + ], |
| 57 | + "no-case-declarations": [ |
| 58 | + "error" |
| 59 | + ], |
| 60 | + "no-empty-function": [ |
| 61 | + "error" |
| 62 | + ], |
| 63 | + "no-empty-pattern": [ |
| 64 | + "error" |
| 65 | + ], |
| 66 | + "no-eq-null": [ |
| 67 | + "error" |
| 68 | + ], |
| 69 | + "no-eval": [ |
| 70 | + "error" |
| 71 | + ], |
| 72 | + "no-extend-native": [ |
| 73 | + "error" |
| 74 | + ], |
| 75 | + "no-extra-bind": [ |
| 76 | + "error" |
| 77 | + ], |
| 78 | + "no-floating-decimal": [ |
| 79 | + "error" |
| 80 | + ], |
| 81 | + "no-implicit-coercion": [ |
| 82 | + "error" |
| 83 | + ], |
| 84 | + "no-implicit-globals": [ |
| 85 | + "error" |
| 86 | + ], |
| 87 | + "no-implied-eval": [ |
| 88 | + "error" |
| 89 | + ], |
| 90 | + "no-invalid-this": [ |
| 91 | + "error" |
| 92 | + ], |
| 93 | + "no-iterator": [ |
| 94 | + "error" |
| 95 | + ], |
| 96 | + "no-labels": [ |
| 97 | + "error" |
| 98 | + ], |
| 99 | + "no-lone-blocks": [ |
| 100 | + "error" |
| 101 | + ], |
| 102 | + "no-loop-func": [ |
| 103 | + "error" |
| 104 | + ], |
| 105 | + "no-multi-spaces": [ |
| 106 | + "error" |
| 107 | + ], |
| 108 | + "no-multi-str": [ |
| 109 | + "warn" |
| 110 | + ], |
| 111 | + "no-new": [ |
| 112 | + "error" |
| 113 | + ], |
| 114 | + "no-new-func": [ |
| 115 | + "error" |
| 116 | + ], |
| 117 | + "no-new-wrappers": [ |
| 118 | + "error" |
| 119 | + ], |
| 120 | + "no-octal-escape": [ |
| 121 | + "error" |
| 122 | + ], |
| 123 | + "no-proto": [ |
| 124 | + "error" |
| 125 | + ], |
| 126 | + "no-redeclare": [ |
| 127 | + "error" |
| 128 | + ], |
| 129 | + "no-return-assign": [ |
| 130 | + "error" |
| 131 | + ], |
| 132 | + "no-script-url": [ |
| 133 | + "error" |
| 134 | + ], |
| 135 | + "no-self-compare": [ |
| 136 | + "error" |
| 137 | + ], |
| 138 | + "no-sequences": [ |
| 139 | + "error" |
| 140 | + ], |
| 141 | + "no-throw-literal": [ |
| 142 | + "error" |
| 143 | + ], |
| 144 | + "no-unmodified-loop-condition": [ |
| 145 | + "error" |
| 146 | + ], |
| 147 | + "no-unused-expressions": [ |
| 148 | + "error" |
| 149 | + ], |
| 150 | + "no-useless-call": [ |
| 151 | + "warn" |
| 152 | + ], |
| 153 | + "no-useless-concat": [ |
| 154 | + "warn" |
| 155 | + ], |
| 156 | + "no-useless-escape": [ |
| 157 | + "warn" |
| 158 | + ], |
| 159 | + "no-void": [ |
| 160 | + "error" |
| 161 | + ], |
| 162 | + "no-with": [ |
| 163 | + "error" |
| 164 | + ], |
| 165 | + "radix": [ |
| 166 | + "error" |
| 167 | + ], |
| 168 | + "wrap-iife": [ |
| 169 | + "error", |
| 170 | + "inside" |
| 171 | + ], |
| 172 | + "yoda": [ |
| 173 | + "warn" |
| 174 | + ], |
| 175 | + "strict": [ |
| 176 | + "error", |
| 177 | + "safe" |
| 178 | + ], |
| 179 | + "no-catch-shadow": [ |
| 180 | + "error" |
| 181 | + ], |
| 182 | + "no-shadow": [ |
| 183 | + "error" |
| 184 | + ], |
| 185 | + "no-shadow-restricted-names": [ |
| 186 | + "error" |
| 187 | + ], |
| 188 | + "no-undef": [ |
| 189 | + "error" |
| 190 | + ], |
| 191 | + "no-undef-init": [ |
| 192 | + "error" |
| 193 | + ], |
| 194 | + "no-undefined": [ |
| 195 | + "error" |
| 196 | + ], |
| 197 | + "no-unused-vars": [ |
| 198 | + "error" |
| 199 | + ], |
| 200 | + "no-use-before-define": [ |
| 201 | + "error", |
| 202 | + "nofunc" |
| 203 | + ], |
| 204 | + // node |
| 205 | + "callback-return": [ |
| 206 | + "error" |
| 207 | + ], |
| 208 | + "global-require": [ |
| 209 | + "error" |
| 210 | + ], |
| 211 | + "handle-callback-err": [ |
| 212 | + "error" |
| 213 | + ], |
| 214 | + "no-mixed-requires": [ |
| 215 | + "error" |
| 216 | + ], |
| 217 | + "no-new-require": [ |
| 218 | + "error" |
| 219 | + ], |
| 220 | + "no-path-concat": [ |
| 221 | + "warn" |
| 222 | + ], |
| 223 | + // style |
| 224 | + "array-bracket-spacing": [ |
| 225 | + "error", |
| 226 | + "never", |
| 227 | + { |
| 228 | + "objectsInArrays": true, |
| 229 | + "arraysInArrays": true |
| 230 | + } |
| 231 | + ], |
| 232 | + "block-spacing": [ |
| 233 | + "error", |
| 234 | + "always" |
| 235 | + ], |
| 236 | + "brace-style": [ |
| 237 | + "error", |
| 238 | + "stroustrup", |
| 239 | + { |
| 240 | + "allowSingleLine": true |
| 241 | + } |
| 242 | + ], |
| 243 | + "camelcase": [ |
| 244 | + "error", |
| 245 | + { |
| 246 | + "properties": "never" |
| 247 | + } |
| 248 | + ], |
| 249 | + "comma-dangle": [ |
| 250 | + "warn", |
| 251 | + "always-multiline" |
| 252 | + ], |
| 253 | + "comma-spacing": [ |
| 254 | + "error", |
| 255 | + { |
| 256 | + "before": false, |
| 257 | + "after": true |
| 258 | + } |
| 259 | + ], |
| 260 | + "comma-style": [ |
| 261 | + "error", |
| 262 | + "last" |
| 263 | + ], |
| 264 | + "eol-last": [ |
| 265 | + "error" |
| 266 | + ], |
| 267 | + "indent": [ |
| 268 | + "error", |
| 269 | + 2, |
| 270 | + { |
| 271 | + "SwitchCase": 1, |
| 272 | + "outerIIFEBody": 1 |
| 273 | + } |
| 274 | + ], |
| 275 | + "key-spacing": [ |
| 276 | + "error", |
| 277 | + { |
| 278 | + "beforeColon": false, |
| 279 | + "afterColon": true, |
| 280 | + "mode": "strict" |
| 281 | + } |
| 282 | + ], |
| 283 | + "keyword-spacing": [ |
| 284 | + "error", |
| 285 | + { |
| 286 | + "before": true, |
| 287 | + "after": true |
| 288 | + } |
| 289 | + ], |
| 290 | + "linebreak-style": [ |
| 291 | + "error", |
| 292 | + "windows" |
| 293 | + ], |
| 294 | + "max-depth": [ |
| 295 | + "error", |
| 296 | + 4 |
| 297 | + ], |
| 298 | + "no-array-constructor": [ |
| 299 | + "error" |
| 300 | + ], |
| 301 | + "no-bitwise": [ |
| 302 | + "warn" |
| 303 | + ], |
| 304 | + "no-lonely-if": [ |
| 305 | + "error" |
| 306 | + ], |
| 307 | + "no-mixed-operators": [ |
| 308 | + "error" |
| 309 | + ], |
| 310 | + "no-nested-ternary": [ |
| 311 | + "error" |
| 312 | + ], |
| 313 | + "no-new-object": [ |
| 314 | + "error" |
| 315 | + ], |
| 316 | + "no-plusplus": [ |
| 317 | + "error", |
| 318 | + { |
| 319 | + "allowForLoopAfterthoughts": true |
| 320 | + } |
| 321 | + ], |
| 322 | + "no-spaced-func": [ |
| 323 | + "error" |
| 324 | + ], |
| 325 | + "no-trailing-spaces": [ |
| 326 | + "error" |
| 327 | + ], |
| 328 | + "no-unneeded-ternary": [ |
| 329 | + "error" |
| 330 | + ], |
| 331 | + "quotes": [ |
| 332 | + "error", |
| 333 | + "single", |
| 334 | + { |
| 335 | + "avoidEscape": false, |
| 336 | + "allowTemplateLiterals": true |
| 337 | + } |
| 338 | + ], |
| 339 | + "space-before-blocks": [ |
| 340 | + "error", |
| 341 | + "always" |
| 342 | + ], |
| 343 | + "space-before-function-paren": [ |
| 344 | + "error", |
| 345 | + "never" |
| 346 | + ], |
| 347 | + "space-infix-ops": [ |
| 348 | + "error", |
| 349 | + { |
| 350 | + "int32Hint": false |
| 351 | + } |
| 352 | + ], |
| 353 | + "space-unary-ops": [ |
| 354 | + "error" |
| 355 | + ], |
| 356 | + "unicode-bom": [ |
| 357 | + "error", |
| 358 | + "never" |
| 359 | + ], |
| 360 | + "wrap-regex": [ |
| 361 | + "error" |
| 362 | + ], |
| 363 | + // es6 |
| 364 | + "arrow-body-style": [ |
| 365 | + "error", |
| 366 | + "always" |
| 367 | + ], |
| 368 | + "arrow-parens": [ |
| 369 | + "error", |
| 370 | + "always" |
| 371 | + ], |
| 372 | + "arrow-spacing": [ |
| 373 | + "error", |
| 374 | + { |
| 375 | + "before": true, |
| 376 | + "after": true |
| 377 | + } |
| 378 | + ], |
| 379 | + "generator-star-spacing": [ |
| 380 | + "error", |
| 381 | + "both" |
| 382 | + ], |
| 383 | + "no-confusing-arrow": [ |
| 384 | + "error" |
| 385 | + ], |
| 386 | + "no-duplicate-imports": [ |
| 387 | + "error" |
| 388 | + ], |
| 389 | + "prefer-const": [ |
| 390 | + "warn" |
| 391 | + ], |
| 392 | + "yield-star-spacing": [ |
| 393 | + "error", |
| 394 | + "both" |
| 395 | + ] |
| 396 | + } |
| 397 | +} |
0 commit comments