New rule: no top level import in .d.ts files #4836
Labels
A-Linter
Area: linter
L-JavaScript
Language: JavaScript and super languages
S-Feature
Status: new feature to implement
Description
more info: https://stackoverflow.com/a/51114250/12887845
using a top level import in a .d.ts file breaks the entire file because of how TypeScript handles ambient vs. normal modules, and tsc is no help debugging it, it just loses access to the defined types.
A rule that implements "warn on top level import in filename matching
/\.d\.ts$/
" would suffice.The text was updated successfully, but these errors were encountered: