-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add linter rule to enforce proper type imports #6388
Comments
consistent-type-imports/ and consistent-type-exports/ rules do address this. Their usage is detailed on elsint blog. Applying them on
Most of those errors can be fixed by
|
I'm in favor of adding these linter rules 👍
|
Looking at some examples in our code
It does not look like it make any difference as tsc is smart enough already to remove if from if only used as a type (I'd assume same applies for other bundlers) Note that we already have I am not fully convinced that type imports are that useful in most cases, do we have an example in Lodestar were this makes a difference? As far as I can see the change from normal to type imports in #6384 does not matter Not against adding these rules but we should have at least one specific case were a lint rule would have saved us before adding it. |
Originally posted by @wemeetagain in #6384 (comment)
The text was updated successfully, but these errors were encountered: