You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I develop, I use ts-node to run cli package, so I don't need to precompile TS files before executing, ts-node does it for me, also it resolves files correctly, if I run require.resolve('@monorepo/builder') during ts-node run, it returns packages/builder/index.ts.
The problem is that no-extraneous-import's resolver doesn't find index.js until the project is built and therefore doesn't throw an error if I import one monorepo's package to another without mentioning in in the package.json. This particular line is responsible for this bug:
My question is why does the rule care if the module's main file is resolved or not. I mean, whether the package exists or not is the responsibility of other tools. At least it would be nice to opt-out that behaviour
The text was updated successfully, but these errors were encountered:
I have a monorepo with packages written in typescript. Each package has structure like this:
package.json structure is following:
when I develop, I use ts-node to run cli package, so I don't need to precompile TS files before executing, ts-node does it for me, also it resolves files correctly, if I run
require.resolve('@monorepo/builder')
during ts-node run, it returnspackages/builder/index.ts
.The problem is that no-extraneous-import's resolver doesn't find index.js until the project is built and therefore doesn't throw an error if I import one monorepo's package to another without mentioning in in the package.json. This particular line is responsible for this bug:
eslint-plugin-node/lib/util/check-extraneous.js
Line 39 in b234dcc
My question is why does the rule care if the module's main file is resolved or not. I mean, whether the package exists or not is the responsibility of other tools. At least it would be nice to opt-out that behaviour
The text was updated successfully, but these errors were encountered: