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

Merged
romanjaros merged 1 commit from renovate/eslint-plugin-simple-import-sort-10.x into master 2023-11-17 22:47:21 +01:00
Member

This PR contains the following updates:

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

Release Notes

lydell/eslint-plugin-simple-import-sort (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!

v9.0.0

Compare Source

This version adds support for [eslint-plugin-svelte], and for declare module in TypeScript.

More generally, imports and exports are now supported anywhere, by finding the set of parents of all imports and exports and working with those. Previously, the plugin only sorted imports and exports directly inside a Program node. For eslint-plugin-svelte and declare module that didn’t cut it.

This is only a breaking change if you imports or exports in declare module in TypeScript, and only in the form of that you need to autofix your files.

v8.0.0

Compare Source

Node.js builtin modules prefixed with node: are now in a separate group by default (regex: ^node:), above the packages group. (Node.js builtins without node: are still sorted together with npm packages like before.)

Before:

import fs from "fs";
import _ from "lodash-es";
import { rmSync } from "node:fs";

After:

import { rmSync } from "node:fs";

import fs from "fs";
import _ from "lodash-es";

This is only a breaking change if you use the node: prefix in imports, and only in the form of that you need to autofix your files.


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

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort) | devDependencies | major | [`7.0.0` -> `10.0.0`](https://renovatebot.com/diffs/npm/eslint-plugin-simple-import-sort/7.0.0/10.0.0) | --- ### Release Notes <details> <summary>lydell/eslint-plugin-simple-import-sort (eslint-plugin-simple-import-sort)</summary> ### [`v10.0.0`](https://github.com/lydell/eslint-plugin-simple-import-sort/blob/HEAD/CHANGELOG.md#Version-1000-2023-01-27) [Compare Source](https://github.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: <!-- prettier-ignore --> ```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: <!-- prettier-ignore --> ```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 ([@&#8203;jakebailey](https://github.com/jakebailey)) for reporting and suggesting the fix! ### [`v9.0.0`](https://github.com/lydell/eslint-plugin-simple-import-sort/blob/HEAD/CHANGELOG.md#Version-900-2023-01-16) [Compare Source](https://github.com/lydell/eslint-plugin-simple-import-sort/compare/v8.0.0...v9.0.0) This version adds support for \[eslint-plugin-svelte], and for `declare module` in TypeScript. More generally, imports and exports are now supported *anywhere,* by finding the set of parents of all imports and exports and working with those. Previously, the plugin only sorted imports and exports directly inside a `Program` node. For eslint-plugin-svelte and `declare module` that didn’t cut it. This is only a breaking change if you imports or exports in `declare module` in TypeScript, and only in the form of that you need to autofix your files. ### [`v8.0.0`](https://github.com/lydell/eslint-plugin-simple-import-sort/blob/HEAD/CHANGELOG.md#Version-800-2022-09-03) [Compare Source](https://github.com/lydell/eslint-plugin-simple-import-sort/compare/v7.0.0...v8.0.0) Node.js builtin modules prefixed with `node:` are now in a separate group by default (regex: `^node:`), above the packages group. (Node.js builtins *without* `node:` are still sorted together with npm packages like before.) Before: ```js import fs from "fs"; import _ from "lodash-es"; import { rmSync } from "node:fs"; ``` After: ```js import { rmSync } from "node:fs"; import fs from "fs"; import _ from "lodash-es"; ``` This is only a breaking change if you use the `node:` prefix in imports, and only in the form of that you need to autofix your files. </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy42MC4yIiwidXBkYXRlZEluVmVyIjoiMzcuNjAuMiIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
mr.renovate added 1 commit 2023-11-17 21:31:27 +01:00
Update dependency eslint-plugin-simple-import-sort to v10
Some checks are pending
forgejo/Procyon/seedling/pipeline/head This commit looks good
forgejo/Procyon/seedling/pipeline/pr-master Build started...
c632adb664
requested review from romanjaros 2023-11-17 21:31:27 +01:00
romanjaros merged commit 0c145b3e72 into master 2023-11-17 22:47:21 +01:00
romanjaros deleted branch renovate/eslint-plugin-simple-import-sort-10.x 2023-11-17 22:47:21 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: procyon/seedling#46
No description provided.