Skip to content

Commit

Permalink
fixup! fix(eslint-plugin): make import/no-extraneous-dependencies wor…
Browse files Browse the repository at this point in the history
…k for react config
  • Loading branch information
Hotell committed Mar 7, 2022
1 parent bc7a0d5 commit 68058ba
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/eslint-plugin/src/configs/react.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// @ts-check
const configHelpers = require('../utils/configHelpers');

const gitRoot = configHelpers.findGitRoot();

/** @type {import("eslint").Linter.Config} */
const config = {
extends: [
Expand Down Expand Up @@ -397,7 +395,13 @@ const getOverrides = () => [
{
files: [...configHelpers.devDependenciesFiles],
rules: {
'import/no-extraneous-dependencies': ['error', { packageDir: ['.', gitRoot] }],
// - turning off this rule for non production code
// - it doesn't work for our use cases as it should
// - we don't wanna specify monorepo packages as devDependencies in package.json
// if they are used in non production code. This rule is unable to handle this scenario.
// TODO:
// As a follow up we will introduce `@nrwl/nx/enforce-module-boundaries` with {"banTransitiveDependencies": true}
'import/no-extraneous-dependencies': ['off'],
},
},
];
Expand Down

0 comments on commit 68058ba

Please sign in to comment.