bcherny / tslint-no-circular-imports

TSLint plugin to detect and warn about circular imports
MIT License
86 stars 12 forks source link

Clear stored imports for a file before reprocessing #10

Closed andyrooger closed 6 years ago

andyrooger commented 6 years ago

Part of #4.

Using tslint-language-service, this plugin is loaded once and will be run multiple times against the same file as they are updated. Each time, a new instance of the linter will be created (presumably that means a new instance of the rule, but I haven't confirmed).

Previously the imports picked up were never cleared so they accumulate indefinitely (meaning cycle errors are not cleared when they are fixed). This PR refreshes the stored imports for a file each time the file is linted again.

andyrooger commented 6 years ago

✨ 👍 Thanks :)