Replies: 1 comment
-
AFAIK declaration files behave like there were included in the entire project, which means that if declaration files export bindings that are then used inside are files, I believe Biome should be able - in the future - to retrieve that information, store it somewhere for later usage inside the analyzer. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Taking a look at the last Ecossystem CI output for Astro, I noticed that a type form the global declaration file package/astro/env.d.ts is reported as unused. However,
noUnusedVariables
should ignore global declaration files.The rule didn't ignore this particular one, because the file contains an external module with an
export
and the semantic model tells the rule that the file contains an export and is thus not a declaration file. This is wrong because inner exports should be ignored.We could change the rule to flag a file as a global declaration file whether there is no top-level exports.
However, a question arises: should the semantic model reports inner exports as exports in the first place?
Beta Was this translation helpful? Give feedback.
All reactions