lydell/eslint-plugin-simple-import-sort
### [`v10.0.0`](https://togithub.com/lydell/eslint-plugin-simple-import-sort/blob/HEAD/CHANGELOG.md#Version-1000-2023-01-27)
[Compare Source](https://togithub.com/lydell/eslint-plugin-simple-import-sort/compare/v9.0.0...v10.0.0)
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:
```ts
import { type B, a } from "a";
export { type B, a } from "a";
```
Now, all specifiers are sorted alphabetically, regardless of `type`:
```ts
import { a, type B } from "a";
export { a, type B } from "a";
```
Motivation:
You might import a class for a type annotation using:
```ts
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:
```diff
import {
- type MyClass,
coolFunction,
+ MyClass,
} from "example";
```
Now, the sorting with the `type` keyword would be:
```ts
import {
coolFunction,
type MyClass,
} from "example";
```
Now there’s no reordering diff, just the `type` keyword being removed:
```diff
import {
coolFunction,
- type MyClass,
+ MyClass,
} from "example";
```
This is consistent with \[“Why sort on `from`?”]\[sort-from].
Thanks to Jake Bailey ([@jakebailey](https://togithub.com/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: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^9.0.0
->^10.0.0
Release Notes
lydell/eslint-plugin-simple-import-sort
### [`v10.0.0`](https://togithub.com/lydell/eslint-plugin-simple-import-sort/blob/HEAD/CHANGELOG.md#Version-1000-2023-01-27) [Compare Source](https://togithub.com/lydell/eslint-plugin-simple-import-sort/compare/v9.0.0...v10.0.0) 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: ```ts import { type B, a } from "a"; export { type B, a } from "a"; ``` Now, all specifiers are sorted alphabetically, regardless of `type`: ```ts import { a, type B } from "a"; export { a, type B } from "a"; ``` Motivation: You might import a class for a type annotation using: ```ts 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: ```diff import { - type MyClass, coolFunction, + MyClass, } from "example"; ``` Now, the sorting with the `type` keyword would be: ```ts import { coolFunction, type MyClass, } from "example"; ``` Now there’s no reordering diff, just the `type` keyword being removed: ```diff import { coolFunction, - type MyClass, + MyClass, } from "example"; ``` This is consistent with \[“Why sort on `from`?”]\[sort-from]. Thanks to Jake Bailey ([@jakebailey](https://togithub.com/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: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.