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
I have put together reproduction repo. npm run lint command will show an error. Currently Biome requires #internal/sum.js to be a dependency listed in package.json. But that’s a subpath import, an alias of ./internal/sum.js.
Perhaps ./ and # could be both treated similarly? As documentation states: "Entries in the "imports" field must always start with # to ensure they are disambiguated from external package specifiers." In other words, a specifier beginning with # is never a package. Hence I think noUndeclaredDependencies should treat these as paths, not as dependency specifiers.
Code of Conduct
I agree to follow Biome's Code of Conduct
The text was updated successfully, but these errors were encountered:
Environment information
Rule name
noUndeclaredDependencies
Playground link
https://github.com/mrazauskas/biome-repro-1726226580391
Expected result
This was mentioned in #2012, but that issues is closed. (For some reason the focus in that issue was on
tsconfig.json
.)Subpath imports is Node.js feature. It is not related with TypeScript. Reference: https://nodejs.org/docs/latest/api/packages.html#subpath-imports
I have put together reproduction repo.
npm run lint
command will show an error. Currently Biome requires#internal/sum.js
to be a dependency listed inpackage.json
. But that’s a subpath import, an alias of./internal/sum.js
.Perhaps
./
and#
could be both treated similarly? As documentation states: "Entries in the"imports"
field must always start with#
to ensure they are disambiguated from external package specifiers." In other words, a specifier beginning with#
is never a package. Hence I thinknoUndeclaredDependencies
should treat these as paths, not as dependency specifiers.Code of Conduct
The text was updated successfully, but these errors were encountered: