summaryrefslogtreecommitdiffstats
path: root/web/react/.eslintrc
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/.eslintrc')
-rw-r--r--web/react/.eslintrc65
1 files changed, 44 insertions, 21 deletions
diff --git a/web/react/.eslintrc b/web/react/.eslintrc
index cdf96905b..53cc75913 100644
--- a/web/react/.eslintrc
+++ b/web/react/.eslintrc
@@ -4,7 +4,9 @@
"jsx": true,
"blockBindings": true,
"modules": true,
- "classes": true
+ "classes": true,
+ "arrowFunctions": true,
+ "defaultParams": true,
},
"plugins": [
"react"
@@ -21,36 +23,36 @@
"rules": {
"comma-dangle": [2, "never"],
"no-cond-assign": [2, "except-parens"],
- "no-console": 1,
- "no-constant-condition": 1,
- "no-debugger": 1,
+ "no-console": 2,
+ "no-constant-condition": 2,
+ "no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
- "no-empty": 1,
- "no-ex-assign": 1,
+ "no-empty": 2,
+ "no-ex-assign": 2,
"no-extra-semi": 2,
- "no-func-assign": 1,
+ "no-func-assign": 2,
"no-inner-declarations": 0,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
+ "no-unexpected-multiline": 2,
"no-unreachable": 2,
"valid-typeof": 2,
- "no-unexpected-multiline": 2,
- "block-scoped-var": 1,
+ "block-scoped-var": 2,
"complexity": [1, 8],
"consistent-return": 2,
"curly": [2, "all"],
- "dot-notation": 2,
"dot-location": [2, "object"],
+ "dot-notation": 2,
"eqeqeq": [2, "smart"],
- "guard-for-in": 1,
- "no-alert": 1,
+ "guard-for-in": 2,
+ "no-alert": 2,
"no-array-constructor": 2,
"no-caller": 2,
- "no-div-regex": 1,
- "no-else-return": 1,
+ "no-div-regex": 2,
+ "no-else-return": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
@@ -58,7 +60,7 @@
"no-implied-eval": 2,
"no-iterator": 2,
"no-labels": 2,
- "no-lone-blocks": 1,
+ "no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": [2, { "exceptions": { "Property": false } }],
"no-multi-str": 0,
@@ -78,10 +80,11 @@
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
- "no-unused-expressions": 2,
"no-undef-init": 2,
+ "no-unused-expressions": 2,
+ "no-useless-concat": 1,
"no-void": 2,
- "no-warning-comments": 0,
+ "no-warning-comments": 1,
"no-with": 2,
"radix": 2,
"vars-on-top": 0,
@@ -97,7 +100,7 @@
// Style
"array-bracket-spacing": [2, "never"],
"brace-style": [2, "1tbs", { "allowSingleLine": false }],
- "camelcase": [2, {"properties": "always"}],
+ "camelcase": [2, {"properties": "never"}],
"comma-spacing": [2, {"before": false, "after": true}],
"comma-style": [2, "last"],
"computed-property-spacing": [2, "never"],
@@ -135,14 +138,33 @@
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"wrap-regex": 2,
+ // ES6 stuff
+ "arrow-parens": [2, "always"],
+ "arrow-spacing": [2, { "before": true, "after": true }],
+ "constructor-super": 2,
+ "generator-star-spacing": [2, {"before": false, "after": true}],
+ "no-class-assign": 2,
+ "no-const-assign": 2,
+ "no-dupe-class-members": 2,
+ "no-this-before-super": 2,
+ "no-var": 0,
+ "object-shorthand": [1, "always"],
+ "prefer-arrow-callback": 1,
+ "prefer-const": 1,
+ "prefer-spread": 2,
+ "prefer-reflect": 1,
+ "prefer-template": 0,
+ "require-yield": 2,
+
// React Specific
"react/display-name": [2, { "acceptTranspilerName": true }],
"react/jsx-boolean-value": [2, "always"],
+ "react/jsx-closing-bracket-location": [2, { "location": "tag-aligned" }],
"react/jsx-curly-spacing": [2, "never"],
+ "react/jsx-indent-props": [2, 4],
"react/jsx-max-props-per-line": [2, { "maximum": 1 }],
- // SOON "react/jsx-indent-props": [2, 4],
"react/jsx-no-duplicate-props": [2, { "ignoreCase": false }],
- "react/jsx-no-literals": 0,
+ "react/jsx-no-literals": 1,
"react/jsx-no-undef": 2,
"react/jsx-quotes": [2, "single", "avoid-escape"],
"react/jsx-uses-react": 2,
@@ -151,10 +173,11 @@
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": 2,
+ "react/no-set-state": 0,
"react/no-unknown-property": 2,
"react/prop-types": 2,
- "react/sort-comp": 0,
"react/self-closing-comp": 2,
+ "react/sort-comp": 0,
"react/wrap-multilines": 2
}
}