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

Update dependency eslint-plugin-simple-import-sort to v10 #2046

Merged

Conversation

zemnmez-renovate-bot
Copy link
Collaborator

This PR contains the following updates:

Package Type Update Change
eslint-plugin-simple-import-sort devDependencies major 9.0.0 -> 10.0.0

Release Notes

lydell/eslint-plugin-simple-import-sort

v10.0.0

Compare Source

This release might move some imported items with type around. This is a breaking formatting change (that only affects TypeScript and Flow), but only in the form of that you need to autofix your files.

In previous versions, type specifiers came first:

import { type B, a } from "a";
export { type B, a } from "a";

Now, all specifiers are sorted alphabetically, regardless of type:

import { a, type B } from "a";
export { a, type B } from "a";

Motivation:

You might import a class for a type annotation using:

import {
  type MyClass,
  coolFunction,
} from "example";

Later, you also start instantiating that class in the same file (new MyClass()), so you remove type.

Previously, this resulted in a messy diff due to the class moving:

 import {
-  type MyClass,
   coolFunction,
+  MyClass,
 } from "example";

Now, the sorting with the type keyword would be:

import {
  coolFunction,
  type MyClass,
} from "example";

Now there’s no reordering diff, just the type keyword being removed:

 import {
   coolFunction,
-   type MyClass,
+   MyClass,
 } from "example";

This is consistent with [“Why sort on from?”][sort-from].

Thanks to Jake Bailey (@​jakebailey) for reporting and suggesting the fix!


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@zemnmez-renovate-bot zemnmez-renovate-bot merged commit 30bcf12 into main Jan 27, 2023
@zemnmez-renovate-bot zemnmez-renovate-bot deleted the renovate/eslint-plugin-simple-import-sort-10.x branch January 27, 2023 21:58
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.

1 participant