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
This is happening, because import/order collects all import statements and assumes they are in the program body.
I would expect the import/order rule to be applied to each body separately. Currently these are the Program body and the TSModuleBlock body, but who knows what the future holds.
Alternatively the rule could be applied to imports which are direct children Program body only.
The text was updated successfully, but these errors were encountered:
Without this, `import/order` checks if all imports in a file are sorted. The
autofix would then move all imports to the type of the file, breaking TypeScript
module declarations.
Closesimport-js#2217
The
import/order
rule gives false positives for imports inside TypeScript module declarations.Practical example:
This is happening, because
import/order
collects all import statements and assumes they are in the program body.I would expect the
import/order
rule to be applied to each body separately. Currently these are theProgram
body and theTSModuleBlock
body, but who knows what the future holds.Alternatively the rule could be applied to imports which are direct children
Program
body only.The text was updated successfully, but these errors were encountered: