-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
feat(linter): add fixer for @typescript-eslint/consistent-type-imports #3984
feat(linter): add fixer for @typescript-eslint/consistent-type-imports #3984
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @mysteryven and the rest of your teammates on |
CodSpeed Performance ReportMerging #3984 will not alter performanceComparing Summary
|
d1cb672
to
1552fbf
Compare
crates/oxc_linter/src/rules/typescript/consistent_type_imports.rs
Outdated
Show resolved
Hide resolved
ac5a1c2
to
2652def
Compare
This is a big ask, but can you test this in https://github.com/oxc-project/oxlint-ecosystem-ci manually? The repos are cloned locally, you can check More over, I think we should add idempotence test to the fixer: run fix, then run fix again on the fixed code, the result should be the same. |
Merge activity
|
Merge first, integrate with ecosystem ci later. |
#3984) This rule's fixer is complicated, I do line by line copy as possible. https://github.com/typescript-eslint/typescript-eslint/blob/7b13dae347075d467ea95d0f986b38c3048906a2/packages/eslint-plugin/src/rules/consistent-type-imports.ts
2652def
to
6c49007
Compare
## [0.6.0] - 2024-07-11 - 5731e39 ast: [**BREAKING**] Store span details inside comment struct (#4132) (Luca Bruno) ### Features - fb549e1 linter: Add vitest/no-focused-tests rule (#4178) (mysteryven) - 6c49007 linter: Add fixer for @typescript-eslint/consistent-type-imports (#3984) (mysteryven) - 278c3e9 linter: Add fixer for jsx-a11y/aria-props (#4176) (DonIsaac) - 2188144 linter: Eslint-plugin-jest/prefer-hooks-in-order (#4052) (cinchen) - cc58614 linter: Better schemas for allow/warn/deny (#4150) (DonIsaac) - c5b4be0 linter: Add fixer for prefer-node-protocol (#4129) (DonIsaac) - 7ec0c0b linter/eslint: Implement no-label-var (#4087) (Jelle van der Waa) ### Bug Fixes - ed4c54c eslint/radix: Detect yield Number.parseInt variant (#4110) (Jelle van der Waa) - e9ad03b linter: Fixer for no-debugger creates incorrect code (#4184) (DonIsaac) - bd69571 linter: Fix top level return panic in eslint/array_callback_return (#4167) (Boshen) - c8f5664 linter: Fix panic with unicode in unicorn/prefer_dom_node_dataset (#4166) (Boshen) - f2b3273 linter: Fix fixer panic in typescript/consistent_indexed_object_style (#4165) (Boshen) - 2334515 linter: Panic in `get_enclosing_function` (#4121) (DonIsaac) - 1b91d40 linter: Incorrect fixer for `no-unused-labels` (#4123) (Don Isaac) - 1729249 linter: Incorrect fix in `no-single-promise-in-promise-methods` rule; (#4094) (DonIsaac) - cc7e893 linter/tree-shaking: Avoid recursive function stackoverflow (#4191) (mysteryven) - 28eeee0 parser: Fix asi error diagnostic pointing at invalid text causing crash (#4163) (Boshen) - 0f02608 semantic: Bind `TSImportEqualsDeclaration`s (#4100) (Don Isaac) ### Performance - ddfa343 diagnostic: Use `Cow<'static, str>` over `String` (#4175) (DonIsaac) ### Refactor - 2687ebc react: Use find_binding helper for finding React binding (#4108) (Jelle van der Waa) Co-authored-by: Boshen <Boshen@users.noreply.github.com>
This rule's fixer is complicated, I do line by line copy as possible.
https://github.com/typescript-eslint/typescript-eslint/blob/7b13dae347075d467ea95d0f986b38c3048906a2/packages/eslint-plugin/src/rules/consistent-type-imports.ts