Skip to content

Commit

Permalink
build: enable import/no-extraneous-dependencies lint
Browse files Browse the repository at this point in the history
Ensure all packages have dependencies properly defined. This is
especially important for a monorepo because dependencies might get
pulled in by another package by chance.

Disable the check for stories, because these depend on the package
they're in.

Signed-off-by: Simon Ser <[email protected]>
  • Loading branch information
emersion committed Feb 6, 2025
1 parent 5ee7d01 commit 49fb48d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@
"tsx": "never",
},
],
"import/no-extraneous-dependencies": 0,
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/*.spec.ts", "**/__tests__/**"],
"packageDir": [".", ".."]
}
],
"import/no-unresolved": [
2,
{
Expand Down Expand Up @@ -124,4 +130,12 @@
"version": "detect",
},
},
"overrides": [
{
"files": ["**/stories/**"],
"rules": {
"import/no-extraneous-dependencies": "off"
}
}
]
}

0 comments on commit 49fb48d

Please sign in to comment.