|
| 1 | +module.exports = { |
| 2 | + parserOptions: { |
| 3 | + ecmaVersion: 6, |
| 4 | + ecmaFeatures: { |
| 5 | + jsx: true, |
| 6 | + modules: true |
| 7 | + }, |
| 8 | + sourceType: "module" |
| 9 | + }, |
| 10 | + parser: "babel-eslint", |
| 11 | + env: { |
| 12 | + browser: true, |
| 13 | + es6: true, |
| 14 | + node: true |
| 15 | + }, |
| 16 | + globals: { |
| 17 | + angular: false, |
| 18 | + define: false, |
| 19 | + describe: false, |
| 20 | + document: false, |
| 21 | + expect: false, |
| 22 | + it: false, |
| 23 | + require: false |
| 24 | + }, |
| 25 | + rules: { |
| 26 | + "indent": ["error", 2, { "SwitchCase": 1 }], |
| 27 | + "object-curly-spacing": ["error", "always"], |
| 28 | + "max-len": ["warn", { "code": 120, "ignoreComments": true, "ignoreTrailingComments": false }], |
| 29 | + "no-console": ["warn"], |
| 30 | + "no-mixed-operators": ["warn", { |
| 31 | + "groups": [ |
| 32 | + ["==", "!=", "===", "!==", ">", ">=", "<", "<="], |
| 33 | + ["&&", "||"], |
| 34 | + ["in", "instanceof"] |
| 35 | + ], |
| 36 | + "allowSamePrecedence": true |
| 37 | + }], |
| 38 | + "no-multi-spaces": ["error"], |
| 39 | + "no-cond-assign": ["warn"], |
| 40 | + "no-fallthrough": ["warn"], |
| 41 | + "no-undef": ["warn"], |
| 42 | + "no-unused-vars": ["warn", { "args": "none" }], |
| 43 | + "no-use-before-define": ["warn", { "functions": false, "classes": false, "variables": false }], |
| 44 | + "no-useless-escape": ["warn"], |
| 45 | + "no-useless-return": ["warn"], |
| 46 | + "no-underscore-dangle": ["warn", { "allow": ["_id"] }], |
| 47 | + "no-redeclare": ["warn"], |
| 48 | + "no-restricted-syntax": ["warn"], |
| 49 | + "operator-linebreak": ["warn", "before"], |
| 50 | + "prefer-promise-reject-errors": ["warn"], |
| 51 | + "padded-blocks": ["warn", { "blocks": "never", "switches": "never", "classes": "never" }], |
| 52 | + "semi": ["error", "always"], |
| 53 | + "valid-typeof": ["warn"], |
| 54 | + "no-eval": ["error"], |
| 55 | + "no-implied-eval": ["error"], |
| 56 | + "no-debugger": ["warn"], |
| 57 | + "no-mixed-spaces-and-tabs": ["warn"], |
| 58 | + }, |
| 59 | + extends: [ |
| 60 | + "eslint:recommended" |
| 61 | + ] |
| 62 | +} |
0 commit comments