|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "browser": true, |
| 4 | + "es6": true, |
| 5 | + "node": true |
| 6 | + }, |
| 7 | + "globals": { |
| 8 | + "describe": true, |
| 9 | + "test": true, |
| 10 | + "expect": true |
| 11 | + }, |
| 12 | + "parser": "babel-eslint", |
| 13 | + "plugins": ["babel", "react"], |
| 14 | + "rules": { |
| 15 | + /* Possible Errors */ |
| 16 | + "no-cond-assign": [1, "except-parens"], |
| 17 | + "no-console": 0, |
| 18 | + "no-constant-condition": 1, |
| 19 | + "no-control-regex": 1, |
| 20 | + "no-debugger": 1, |
| 21 | + "no-dupe-args": 1, |
| 22 | + "no-dupe-keys": 1, |
| 23 | + "no-duplicate-case": 0, |
| 24 | + "no-empty": 1, |
| 25 | + "no-empty-character-class": 1, |
| 26 | + "no-ex-assign": 1, |
| 27 | + "no-extra-boolean-cast": 1, |
| 28 | + "no-extra-parens": 0, |
| 29 | + "no-func-assign": 1, |
| 30 | + "no-inner-declarations": [1, "functions"], |
| 31 | + "no-invalid-regexp": 1, |
| 32 | + "no-irregular-whitespace": 1, |
| 33 | + "no-negated-in-lhs": 1, |
| 34 | + "no-obj-calls": 1, |
| 35 | + "no-regex-spaces": 1, |
| 36 | + "no-reserved-keys": 0, |
| 37 | + "no-sparse-arrays": 1, |
| 38 | + "no-unexpected-multiline": 1, |
| 39 | + "no-unreachable": 1, |
| 40 | + "use-isnan": 1, |
| 41 | + "valid-jsdoc": 1, |
| 42 | + "valid-typeof": 1, |
| 43 | + |
| 44 | + /* Best Practices */ |
| 45 | + "accessor-pairs": 0, |
| 46 | + "block-scoped-var": 0, // see Babel section |
| 47 | + "complexity": 0, |
| 48 | + "consistent-return": 1, |
| 49 | + "curly": [1, "all"], |
| 50 | + "default-case": 0, |
| 51 | + "dot-notation": [1, { "allowKeywords": true, "allowPattern": "" }], |
| 52 | + "eqeqeq": 1, |
| 53 | + "guard-for-in": 0, |
| 54 | + "no-alert": 1, |
| 55 | + "no-caller": 1, |
| 56 | + "no-div-regex": 1, |
| 57 | + "no-else-return": 1, |
| 58 | + "no-eq-null": 0, |
| 59 | + "no-eval": 1, |
| 60 | + "no-extend-native": 1, |
| 61 | + "no-extra-bind": 1, |
| 62 | + "no-fallthrough": 0, |
| 63 | + "no-floating-decimal": 1, |
| 64 | + "no-implied-eval": 1, |
| 65 | + "no-iterator": 1, |
| 66 | + "no-labels": 1, |
| 67 | + "no-lone-blocks": 1, |
| 68 | + "no-loop-func": 1, |
| 69 | + "no-multi-spaces": 0, |
| 70 | + "no-multi-str": 1, |
| 71 | + "no-native-reassign": 1, |
| 72 | + "no-new": 1, |
| 73 | + "no-new-func": 1, |
| 74 | + "no-new-wrappers": 1, |
| 75 | + "no-octal": 1, |
| 76 | + "no-octal-escape": 1, |
| 77 | + "no-param-reassign": 0, |
| 78 | + "no-process-env": 0, |
| 79 | + "no-proto": 1, |
| 80 | + "no-redeclare": 1, |
| 81 | + "no-return-assign": 1, |
| 82 | + "no-script-url": 1, |
| 83 | + "no-self-compare": 1, |
| 84 | + "no-sequences": 1, |
| 85 | + "no-throw-literal": 1, |
| 86 | + "no-unused-expressions": 0, |
| 87 | + "no-void": 0, |
| 88 | + "no-warning-comments": [ |
| 89 | + 1, |
| 90 | + { "terms": ["todo", "tofix"], "location": "start" } |
| 91 | + ], |
| 92 | + "no-with": 1, |
| 93 | + "radix": 1, |
| 94 | + "vars-on-top": 1, |
| 95 | + "yoda": [1, "never"], |
| 96 | + |
| 97 | + /* Strict Mode */ |
| 98 | + "strict": [1, "never"], |
| 99 | + |
| 100 | + /* Variables */ |
| 101 | + "no-catch-shadow": 0, |
| 102 | + "no-delete-var": 1, |
| 103 | + "no-label-var": 1, |
| 104 | + "no-shadow": 1, |
| 105 | + "no-shadow-restricted-names": 1, |
| 106 | + "no-undef": 1, |
| 107 | + "no-undef-init": 1, |
| 108 | + "no-undefined": 1, |
| 109 | + "no-unused-vars": [1, { "vars": "local", "args": "after-used" }], |
| 110 | + "no-use-before-define": 1, |
| 111 | + |
| 112 | + /* Node.js */ |
| 113 | + "handle-callback-err": 1, |
| 114 | + "no-mixed-requires": 1, |
| 115 | + "no-new-require": 1, |
| 116 | + "no-path-concat": 1, |
| 117 | + "no-process-exit": 1, |
| 118 | + "no-restricted-modules": [1, ""], // add any unwanted Node.js core modules |
| 119 | + "no-sync": 1, |
| 120 | + |
| 121 | + /* Stylistic Issues */ |
| 122 | + "camelcase": [1, { "properties": "always" }], |
| 123 | + "computed-property-spacing": 0, |
| 124 | + "consistent-this": 0, |
| 125 | + "func-names": 0, |
| 126 | + "func-style": 0, |
| 127 | + "linebreak-style": 0, |
| 128 | + "max-nested-callbacks": [0, 3], |
| 129 | + "new-cap": 0, // see Babel section |
| 130 | + "newline-after-var": 0, |
| 131 | + "no-array-constructor": 1, |
| 132 | + "no-continue": 1, |
| 133 | + "no-inline-comments": 0, |
| 134 | + "no-lonely-if": 1, |
| 135 | + "no-nested-ternary": 0, |
| 136 | + "no-new-object": 1, |
| 137 | + "no-ternary": 0, |
| 138 | + "no-underscore-dangle": 0, |
| 139 | + "no-unneeded-ternary": 1, |
| 140 | + "object-curly-spacing": 0, // see Babel section |
| 141 | + "one-var": [1, "never"], |
| 142 | + "operator-assignment": [1, "never"], |
| 143 | + "padded-blocks": [0, "never"], |
| 144 | + "quote-props": [0, "as-needed"], |
| 145 | + "sort-vars": 0, |
| 146 | + "space-after-keywords": 0, |
| 147 | + "space-unary-ops": 0, |
| 148 | + "spaced-comment": [1, "always"], |
| 149 | + |
| 150 | + /* ECMAScript 6 */ |
| 151 | + "constructor-super": 1, |
| 152 | + "no-this-before-super": 1, |
| 153 | + "no-var": 1, |
| 154 | + "object-shorthand": [1, "always"], |
| 155 | + "prefer-const": 1, |
| 156 | + |
| 157 | + /* Babel */ |
| 158 | + "babel/new-cap": 1, |
| 159 | + "babel/object-curly-spacing": [1, "always"], |
| 160 | + |
| 161 | + /* React */ |
| 162 | + "react/display-name": 1, |
| 163 | + "react/jsx-boolean-value": 1, |
| 164 | + "react/jsx-no-bind": 1, |
| 165 | + "react/jsx-no-duplicate-props": 1, |
| 166 | + "react/jsx-no-undef": 1, |
| 167 | + "react/jsx-sort-props": 0, |
| 168 | + "react/jsx-uses-react": 1, |
| 169 | + "react/jsx-uses-vars": 1, |
| 170 | + "react/no-danger": 1, |
| 171 | + "react/no-did-mount-set-state": 1, |
| 172 | + "react/no-did-update-set-state": 1, |
| 173 | + "react/no-multi-comp": 1, |
| 174 | + "react/no-unknown-property": 1, |
| 175 | + "react/prop-types": 1, |
| 176 | + "react/react-in-jsx-scope": 1, |
| 177 | + "react/self-closing-comp": 1, |
| 178 | + "react/sort-comp": 1, |
| 179 | + "react/wrap-multilines": 0 |
| 180 | + } |
| 181 | +} |
0 commit comments