diff --git a/.eslintrc b/.eslintrc index 0b9e4e0..fb66484 100644 --- a/.eslintrc +++ b/.eslintrc @@ -12,8 +12,13 @@ }, "parser": "babel-eslint", "rules": { + "prettier/prettier": [ + "error", + { + "printWidth": 120 + } + ], // Possible Errors - "comma-dangle": [2, "never"], "no-cond-assign": 2, "no-console": 0, "no-constant-condition": 2, @@ -24,12 +29,9 @@ "no-empty-character-class": 2, "no-ex-assign": 2, "no-extra-boolean-cast": 2, - "no-extra-parens": 0, - "no-extra-semi": 2, "no-func-assign": 2, "no-inner-declarations": 2, "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, "no-negated-in-lhs": 2, "no-obj-calls": 2, "no-regex-spaces": 2, @@ -45,7 +47,6 @@ "consistent-return": 2, "curly": 2, "default-case": 2, - "dot-notation": 2, "eqeqeq": 2, "guard-for-in": 2, "no-alert": 2, @@ -63,7 +64,6 @@ "no-labels": 2, "no-lone-blocks": 2, "no-loop-func": 2, - "no-multi-spaces": 2, "no-multi-str": 0, "no-native-reassign": 2, "no-new": 2, @@ -100,63 +100,31 @@ "no-unused-vars": 2, "no-use-before-define": 2, // Stylistic Issues - "indent": [2, 2, { - "SwitchCase": 1 - }], - "brace-style": 2, "camelcase": 0, - "comma-spacing": 2, - "comma-style": 2, "consistent-this": 0, - "eol-last": 2, "func-names": 0, "func-style": 0, - "key-spacing": [2, { - "beforeColon": false, - "afterColon": true - }], "max-nested-callbacks": 0, "new-cap": 0, - "new-parens": 2, "no-array-constructor": 2, "no-inline-comments": 0, "no-lonely-if": 2, - "no-mixed-spaces-and-tabs": 2, "no-nested-ternary": 2, "no-new-object": 2, - "semi-spacing": [2, { - "before": false, - "after": true - }], - "no-spaced-func": 2, "no-ternary": 0, - "no-trailing-spaces": 2, - "no-multiple-empty-lines": 2, "no-underscore-dangle": 0, "one-var": 0, "operator-assignment": [2, "always"], - "padded-blocks": 0, - "quotes": [2, "double"], - "quote-props": [2, "as-needed"], - "semi": [2, "always"], "sort-vars": [2, {"ignoreCase": true}], - "keyword-spacing": 2, - "space-before-blocks": 2, - "object-curly-spacing": [2, "never"], - "array-bracket-spacing": [2, "never"], - "space-in-parens": 2, - "space-infix-ops": 2, - "space-unary-ops": 2, - "spaced-comment": 2, "wrap-regex": 0, // Legacy "max-depth": 0, - "max-len": [2, 120], "max-params": 0, "max-statements": 0, "no-plusplus": 0 }, "plugins": [ + "prettier", "react" ], "extends": ["plugin:react/recommended"] diff --git a/package.json b/package.json index a667a78..0bc0002 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "babel-preset-react": "^6.3.13", "babel-preset-stage-0": "^6.3.13", "css-loader": "^0.23.1", - "eslint": "^2.2.0", + "eslint": "^3.14.1", + "eslint-plugin-prettier": "^2.1.2", "eslint-plugin-react": "^4.1.0", "font-awesome-webpack": "0.0.4", "jasmine-core": "^2.4.1", @@ -54,6 +55,7 @@ "less": "^2.6.0", "less-loader": "^2.2.2", "phantomjs-prebuilt": "^2.1.6", + "prettier": "^1.5.0", "react-transform-hmr": "^1.0.1", "style-loader": "^0.13.0", "url-loader": "^0.5.7",