diff --git a/.eslintrc.js b/.eslintrc.js index 30a9e57f4a..44abcb66b5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,7 +15,8 @@ module.exports = { }, "plugins": [ "react", - "flowtype" + "flowtype", + "import" ], "rules": { // Flow type rules: @@ -26,6 +27,11 @@ module.exports = { "flowtype/space-after-type-colon": [ 2, "always" ], "flowtype/delimiter-dangle": [ 2, "always-multiline" ], + // ES6 Import rules: + "import/no-duplicates": "error", + "import/no-unresolved": "error", + "import/named": "error", + // JS Rules: "indent": [ "error", @@ -85,7 +91,6 @@ module.exports = { "space-in-parens": ["error", "never"], "spaced-comment": "error", "generator-star-spacing": "error", - "no-duplicate-imports": "error", "no-var": "error", "prefer-const": "error", "array-bracket-spacing": "error", diff --git a/package.json b/package.json index 3c5dd45a08..dd5888e93e 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "eslint": "^3.10.2", "eslint-config-google": "^0.6.0", "eslint-plugin-flowtype": "^2.30.0", + "eslint-plugin-import": "^2.2.0", "eslint-plugin-react": "^6.4.0", "express": "^4.13.4", "fetch-jsonp": "^1.0.2",