-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Enable @typescript-eslint/consistent-type-imports lint rule #4611
base: develop
Are you sure you want to change the base?
Conversation
Some background on this rule: https://typescript-eslint.io/blog/consistent-type-imports-and-exports-why-and-how/ We already have the equivalent of this for exports from https://github.com/matrix-org/eslint-plugin-matrix-org/blob/a1ce5fbb7d425b932c504ae2bb7f985e3c07d9fd/typescript.js#L99 Revert "Enable @typescript-eslint/consistent-type-imports lint rule" This reverts commit 41a02493d0f30d74b5f76ee076b6574c7835e236. .
Revert "Fix resulting violations" This reverts commit 9aea668. Fix violations
@@ -139,6 +139,8 @@ module.exports = { | |||
}, | |||
], | |||
"no-extra-boolean-cast": "error", | |||
// to avoid unnecessary runtime dependencies between files | |||
"@typescript-eslint/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add this to https://github.com/matrix-org/eslint-plugin-matrix-org/blob/a1ce5fbb7d425b932c504ae2bb7f985e3c07d9fd/typescript.js#L99 instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would make sense to me, assuming agreeable that this is generally a Good Thing.
If so I can make the necessary PRs.
Some background on this rule: https://typescript-eslint.io/blog/consistent-type-imports-and-exports-why-and-how/ Originally this was just for matrix-js-sdk: matrix-org/matrix-js-sdk#4611
This is a speculative PR after encountering an unexpected (and unnecessary) circular dependency in some unit tests.
Some background on this rule: https://typescript-eslint.io/blog/consistent-type-imports-and-exports-why-and-how/
We already have the equivalent of this for exports from https://github.com/matrix-org/eslint-plugin-matrix-org/blob/a1ce5fbb7d425b932c504ae2bb7f985e3c07d9fd/typescript.js#L99
Checklist
public
/exported
symbols have accurate TSDoc documentation.