|
| 1 | +module.exports = { |
| 2 | + "root": true, |
| 3 | + "extends": "eslint:recommended", |
| 4 | + "parser": "babel-eslint", |
| 5 | + "env": {"browser": true, "es6": true, "jest": true, "jquery": true}, |
| 6 | + "globals": { |
| 7 | + "__DEV__": true, |
| 8 | + "dataLayer": true, |
| 9 | + "FB": true, |
| 10 | + "google": true, |
| 11 | + "new": true, |
| 12 | + "process": true, |
| 13 | + "require": true, |
| 14 | + "target": true |
| 15 | + }, |
| 16 | + "parserOptions": { |
| 17 | + "sourceType": "module", |
| 18 | + "ecmaVersion": 7, |
| 19 | + "ecmaFeatures": { |
| 20 | + "classes": true, |
| 21 | + "experimentalObjectRestSpread": true, |
| 22 | + "jsx": true, |
| 23 | + "modules": true, |
| 24 | + "templateStrings": true |
| 25 | + } |
| 26 | + }, |
| 27 | + "plugins": ["react", "class-property", "babel"], |
| 28 | + "rules": { |
| 29 | + "arrow-body-style": "off", |
| 30 | + "indent": ["error", 2, {"SwitchCase": 1}], |
| 31 | + "linebreak-style": ["error", "unix"], |
| 32 | + "semi": ["error", "always"], |
| 33 | + "block-scoped-var": "error", |
| 34 | + "brace-style": "error", |
| 35 | + "camelCase": "off", |
| 36 | + "comma-dangle": "off", |
| 37 | + "comma-spacing": "error", |
| 38 | + "comma-style": "error", |
| 39 | + "complexity": "off", |
| 40 | + "curly": ["error", "all"], |
| 41 | + "default-case": "off", |
| 42 | + "dot-notation": ["error", {"allowKeywords": true}], |
| 43 | + "eol-last": "error", |
| 44 | + "eqeqeq": "error", |
| 45 | + "func-names": "off", |
| 46 | + "func-style": ["error", "declaration", {"allowArrowFunctions": true}], |
| 47 | + "generator-star": "off", |
| 48 | + "guard-for-in": "off", |
| 49 | + "handle-callback-err": "error", |
| 50 | + "key-spacing": ["error", {"beforeColon": false, "afterColon": true}], |
| 51 | + "keyword-spacing": "error", |
| 52 | + "max-depth": ["warn", 4], |
| 53 | + "max-len": ["error", 120], |
| 54 | + "max-nested-callbacks": ["warn", 2], |
| 55 | + "max-params": ["warn", 4], |
| 56 | + "max-statements": ["off", 10], |
| 57 | + "new-cap": "error", |
| 58 | + "new-parens": "error", |
| 59 | + "no-alert": "error", |
| 60 | + "no-array-constructor": "error", |
| 61 | + "no-caller": "error", |
| 62 | + "no-catch-shadow": "error", |
| 63 | + "no-cond-assign": ["error", "always"], |
| 64 | + "no-confusing-arrow": "error", |
| 65 | + "no-console": "off", |
| 66 | + "no-constant-condition": "error", |
| 67 | + "no-control-regex": "error", |
| 68 | + "no-debugger": "error", |
| 69 | + "no-delete-var": "error", |
| 70 | + "no-div-regex": "off", |
| 71 | + "no-dupe-keys": "error", |
| 72 | + "no-else-return": "error", |
| 73 | + "no-empty": "error", |
| 74 | + "no-empty-character-class": "error", |
| 75 | + "no-eq-null": "error", |
| 76 | + "no-eval": "error", |
| 77 | + "no-ex-assign": "error", |
| 78 | + "no-extend-native": "error", |
| 79 | + "no-extra-bind": "error", |
| 80 | + "no-extra-boolean-cast": "error", |
| 81 | + "no-extra-parens": ["error", "functions"], |
| 82 | + "no-extra-semi": "error", |
| 83 | + "no-fallthrough": "error", |
| 84 | + "no-floating-decimal": "off", |
| 85 | + "no-func-assign": "error", |
| 86 | + "no-implied-eval": "error", |
| 87 | + "no-inline-comments": "off", |
| 88 | + "no-inner-declarations": ["error", "functions"], |
| 89 | + "no-invalid-regexp": "error", |
| 90 | + "no-irregular-whitespace": "error", |
| 91 | + "no-iterator": "error", |
| 92 | + "no-label-var": "error", |
| 93 | + "no-labels": "error", |
| 94 | + "no-lone-blocks": "error", |
| 95 | + "no-lonely-if": "error", |
| 96 | + "no-loop-func": "error", |
| 97 | + "no-mixed-requires": ["off", false], |
| 98 | + "no-mixed-spaces-and-tabs": ["error", false], |
| 99 | + "no-multi-spaces": "error", |
| 100 | + "no-multi-str": "error", |
| 101 | + "no-multiple-empty-lines": ["error", {"max": 2}], |
| 102 | + "no-native-reassign": "error", |
| 103 | + "no-negated-in-lhs": "error", |
| 104 | + "no-nested-ternary": "off", |
| 105 | + "no-new": "off", |
| 106 | + "no-new-func": "error", |
| 107 | + "no-new-object": "error", |
| 108 | + "no-new-require": "off", |
| 109 | + "no-new-wrappers": "error", |
| 110 | + "no-obj-calls": "error", |
| 111 | + "no-octal": "error", |
| 112 | + "no-octal-escape": "error", |
| 113 | + "no-path-concat": "off", |
| 114 | + "no-plusplus": "off", |
| 115 | + "no-process-env": "off", |
| 116 | + "no-process-exit": "off", |
| 117 | + "no-proto": "error", |
| 118 | + "no-redeclare": "error", |
| 119 | + "no-regex-spaces": "error", |
| 120 | + "no-reserved-keys": "off", |
| 121 | + "no-restricted-modules": "off", |
| 122 | + "no-return-assign": "error", |
| 123 | + "no-script-url": "error", |
| 124 | + "no-self-compare": "error", |
| 125 | + "no-sequences": "error", |
| 126 | + "no-shadow": ["error", {"allow": ["done", "resolve", "reject", "done", "callBack", "state"]}], |
| 127 | + "no-shadow-restricted-names": "error", |
| 128 | + "no-spaced-func": "error", |
| 129 | + "no-sparse-arrays": "error", |
| 130 | + "no-sync": "off", |
| 131 | + "no-ternary": "off", |
| 132 | + "no-trailing-spaces": "error", |
| 133 | + "no-undef": "error", |
| 134 | + "no-undef-init": "error", |
| 135 | + "no-undefined": "off", |
| 136 | + "no-underscore-dangle": "off", |
| 137 | + "no-unreachable": "error", |
| 138 | + "no-unused-expressions": "error", |
| 139 | + "no-unused-vars": ["error", {"vars": "all", "args": "after-used"}], |
| 140 | + "no-use-before-define": "error", |
| 141 | + "no-void": "error", |
| 142 | + "no-var": "off", |
| 143 | + "no-warning-comments": ["off", {"terms": ["todo", "fixme", "xxx"], "location": "start"}], |
| 144 | + "no-with": "error", |
| 145 | + "operator-assignment": ["off", "always"], |
| 146 | + "padded-blocks": "off", |
| 147 | + "quote-props": "off", |
| 148 | + "radix": "error", |
| 149 | + "sort-vars": "off", |
| 150 | + "space-after-function-name": ["off", "never"], |
| 151 | + "space-before-blocks": "error", |
| 152 | + "space-in-parens": "error", |
| 153 | + "space-infix-ops": "error", |
| 154 | + "space-unary-ops": ["error", {"words": true, "nonwords": false}], |
| 155 | + "spaced-comment": "error", |
| 156 | + "strict": ["error", "global"], |
| 157 | + "use-isnan": "error", |
| 158 | + "valid-jsdoc": "error", |
| 159 | + "valid-typeof": "error", |
| 160 | + "vars-on-top": "off", |
| 161 | + "wrap-iife": "off", |
| 162 | + "wrap-regex": "off", |
| 163 | + "yoda": "off", |
| 164 | + "arrow-spacing": ["error", {"before": true, "after": true}], |
| 165 | + "constructor-super": "error", |
| 166 | + "generator-star-spacing": "error", |
| 167 | + "no-class-assign": "error", |
| 168 | + "no-const-assign": "error", |
| 169 | + "no-dupe-class-members": "error", |
| 170 | + "no-this-before-super": "off", |
| 171 | + "object-shorthand": ["error", "always"], |
| 172 | + "prefer-arrow-callback": "error", |
| 173 | + "prefer-const": "error", |
| 174 | + "prefer-spread": "error", |
| 175 | + "prefer-reflect": "error", |
| 176 | + "prefer-template": "error", |
| 177 | + "require-yield": "error", |
| 178 | + "babel/semi": "error", |
| 179 | + "react/display-name": "off", |
| 180 | + "react/forbid-prop-types": "off", |
| 181 | + "react/jsx-boolean-value": "off", |
| 182 | + "react/jsx-closing-bracket-location": "off", |
| 183 | + "react/jsx-curly-spacing": "off", |
| 184 | + "react/jsx-indent-props": "off", |
| 185 | + "react/jsx-max-props-per-line": "off", |
| 186 | + "react/jsx-no-duplicate-props": "error", |
| 187 | + "react/jsx-no-literals": "off", |
| 188 | + "react/jsx-no-undef": "error", |
| 189 | + "jsx-quotes": "error", |
| 190 | + "react/jsx-sort-props": "error", |
| 191 | + "react/jsx-uses-react": "error", |
| 192 | + "react/jsx-uses-vars": "error", |
| 193 | + "react/no-danger": "error", |
| 194 | + "react/no-did-mount-set-state": "error", |
| 195 | + "react/no-did-update-set-state": "error", |
| 196 | + "react/no-direct-mutation-state": "error", |
| 197 | + "react/no-set-state": "off", |
| 198 | + "react/no-unknown-property": "error", |
| 199 | + "react/prop-types": "off", |
| 200 | + "react/react-in-jsx-scope": "off", |
| 201 | + "react/require-extension": "off", |
| 202 | + "react/self-closing-comp": "off", |
| 203 | + "react/sort-comp": "off", |
| 204 | + "react/sort-prop-types": "error", |
| 205 | + "react/wrap-multilines": "off" |
| 206 | + } |
| 207 | +}; |
0 commit comments