within our monorepo we run lint on packages without need to have all packages build first, for performance and simplicity reasons.
Recently our releases started to fail because import/no-extraneous-dependencies issues.
Our release pipeline runs build first then lint ( on PR bases we run lint and build in parallel ).
issue with this rule
My naive understanding of how this rule works was that it processes package.json deps and evaluates import token names from source within AST.
I was bit surprised that after some amount of investigation I found out that this rule relies on package assets to be build first(physically present) as it uses resolve on real filesystem approach https://github.com/import-js/eslint-plugin-import/blob/main/src/rules/no-extraneous-dependencies.js#L195. I understand there is some more things going on with aliases to properly work with some edge-case scenarios.
We need to be able to run lint without a need to build things first (this plugin is now the only blocker).
Naive approach to make this work would be to remove the physical resolution and module traversing completely or to provide a configuration to the rule that can disable this behaviour.
Would love to hear maintainers thoughts in order how we should unblock ourselves.
cheers 🙌
within our monorepo we run
linton packages without need to have all packages build first, for performance and simplicity reasons.Recently our releases started to fail because
import/no-extraneous-dependenciesissues.Our release pipeline runs build first then lint ( on PR bases we run lint and build in parallel ).
issue with this rule
My naive understanding of how this rule works was that it processes package.json deps and evaluates import token names from source within AST.
I was bit surprised that after some amount of investigation I found out that this rule relies on package assets to be build first(physically present) as it uses resolve on real filesystem approach https://github.com/import-js/eslint-plugin-import/blob/main/src/rules/no-extraneous-dependencies.js#L195. I understand there is some more things going on with aliases to properly work with some edge-case scenarios.
We need to be able to run lint without a need to build things first (this plugin is now the only blocker).
Naive approach to make this work would be to remove the physical resolution and module traversing completely or to provide a configuration to the rule that can disable this behaviour.
Would love to hear maintainers thoughts in order how we should unblock ourselves.
cheers 🙌