Skip to content
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

fix(no-deprecated-type-references): no overlapping import fixes #5530

Merged
merged 3 commits into from
Sep 7, 2022

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Sep 7, 2022

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Fix the @blueprintjs/no-deprecated-type-references rule to return fixes properly so that multiple instances/uses of a deprecated type are all fixed, and not just the first one.

Reviewers should focus on:

Check out the new test case. That was failing before this change, as only the first type reference of IItemRendererProps was getting replaced with ItemRendererProps.

The problem was that we were reporting a fix on the type reference and the import of that type for every instance of deprecated usage (two fixes for a single violation). ESLint will not apply overlapping fixes, so only the first fix list was being applied, even though all violations were being reported.

@adidahiya adidahiya requested a review from styu September 7, 2022 15:03
@blueprint-bot
Copy link

Remove unused import

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

Add test case

Previews: documentation | landing | table | demo

@adidahiya adidahiya changed the title [eslint-plugin] fix(no-deprecated-type-references): no overlapping import fixes fix(no-deprecated-type-references): no overlapping import fixes Sep 7, 2022
@adidahiya adidahiya merged commit 8ff2797 into develop Sep 7, 2022
@adidahiya adidahiya deleted the ad/fix-multiple-deprecated-type-references branch September 7, 2022 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants