From 969db6a87bcf62b405288d45cbb4f34088d2aee9 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 8 May 2017 15:36:24 -0400 Subject: [PATCH] Tweak .eslintrc due to yarn/eslint issue When using yarn, eslint is loading an older version of eslint-plugin-import, which causes problems in the current configuration. This commit fixes the problems by disabling the problem rule and adjusting the problem glob. See: https://github.com/yarnpkg/yarn/issues/3332 And: https://github.com/benmosher/eslint-plugin-import/issues/602 --- .eslintrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index c60218cb..b1e7e7b7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,6 +10,7 @@ "no-underscore-dangle": ["error", { "allow": ["_id"] }], // because mongo "no-unused-vars": [ "error", { "args": "none" } ], // don't check function arguments "no-plusplus": ["error", { "allowForLoopAfterthoughts": true }], // allow ++ in for loop expression - "import/no-extraneous-dependencies": ["error", {"devDependencies": ["src/helpers/*.js"]}] // don't check helpers for extraneous deps + "import/no-named-default": "off", // turning it off since it's currently broken w/ yarn (see: https://github.com/yarnpkg/yarn/issues/3332) + "import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/src/helpers/*.js"]}] // don't check helpers for extraneous deps (note: this glob must be preceeded by '**' due to bug in eslint-plugin-import@2.0.1. See: https://github.com/benmosher/eslint-plugin-import/issues/602) } }