diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-03 10:49:36 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-03 15:00:47 -0400 |
commit | 4b22c1f99cb05be5ca187f2fd70ee2664c34de57 (patch) | |
tree | bfbaa7c5c849b6656eb8ea1267ce36028b0670b2 /web/react/.eslintrc | |
parent | e69e2db6b4724517a39c57e3689dec82608581ee (diff) | |
download | chat-4b22c1f99cb05be5ca187f2fd70ee2664c34de57.tar.gz chat-4b22c1f99cb05be5ca187f2fd70ee2664c34de57.tar.bz2 chat-4b22c1f99cb05be5ca187f2fd70ee2664c34de57.zip |
Upgrading ESLint and adding some more rules. Refactoring to meet these new rules
Diffstat (limited to 'web/react/.eslintrc')
-rw-r--r-- | web/react/.eslintrc | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/web/react/.eslintrc b/web/react/.eslintrc index ab000e941..41558aacd 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" @@ -34,16 +36,16 @@ "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, "complexity": [0, 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, @@ -78,8 +80,9 @@ "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": 0, "no-void": 2, "no-warning-comments": 0, "no-with": 2, @@ -135,12 +138,31 @@ "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": [0, "always"], + "prefer-arrow-callback": 0, + "prefer-const": 0, + "prefer-spread": 2, + "prefer-reflect": 0, + "prefer-template": 0, + "require-yield": 0, + // 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-undef": 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 } } |