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
I'm not sure if I should be suggesting this here or as part of plugin:@typescript-eslint/recommended, but here seems like a good enough place to start a discussion. Objectively I know this is definitely a "John has a preference thing", but let's see where it goes.
I very much appreciate distinguishing between type import and value imports. They are different things and I believe it aids the readability of code and is therefore a GOOD THING ™️
The question is, should this be a default part of the ruleset for CTA? As this is clearly and demonstrably the most important ESLint rule of all time. (I jest, but only slightly 😄 )
The answer can of course be "no, you're a little over the top about this" - I realise that I am.
Hah I think you're very much right about it for your use cases. But some folks prefer keeping things all inline in projects where it doesn't make a functional difference. E.g. if the project is built with a bundler then consistent exports and imports become "just" a style concern. Specifically:
I believe it aids the readability of code and is therefore a GOOD THING ™️
I believe it makes it can make code harder to read by cluttering it with type keywords. 😜
Closing as wontfix because it's just a bit more opinionated than what this template goes for. If you set it enabled in all your projects then that's totally reasonable.
I also imagine if there's opportunity for feature work in making it easier for folks to add "overrides" on top of this template's tooling? This would be a good use case. Another might be adding in framework-specific lint rules such as React's. That'd be tracked by the work in making a generalized engine: #498 (comment)
Bug Report Checklist
main
branch of the repository.Overview
I'm not sure if I should be suggesting this here or as part of
plugin:@typescript-eslint/recommended
, but here seems like a good enough place to start a discussion. Objectively I know this is definitely a "John has a preference thing", but let's see where it goes.I very much appreciate distinguishing between type import and value imports. They are different things and I believe it aids the readability of code and is therefore a GOOD THING ™️
Observe my paean to
@typescript-eslint/consistent-type-imports
here: https://johnnyreilly.com/typescript-5-importsnotusedasvalues-error-eslint-consistent-type-imports#eslint-and-typescript-eslintconsistent-type-imports-to-the-rescueThe question is, should this be a default part of the ruleset for CTA? As this is clearly and demonstrably the most important ESLint rule of all time. (I jest, but only slightly 😄 )
The answer can of course be "no, you're a little over the top about this" - I realise that I am.
https://typescript-eslint.io/rules/consistent-type-imports/
Additional Info
N/A
The text was updated successfully, but these errors were encountered: