-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Closed as not planned
Copy link
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
type A = { a: "A"; }
type B = { b: "B"; }
type C = { c: "C"; }
// this line violates @typescript-eslint/sort-type-union-intersection-members
export type D = (C | B) & A;
ESLint Config
{
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/sort-type-union-intersection-members": "warn"
}
}
tsconfig
Expected Result
I expected that it would change the line to
export type D = A & (B | C);
Actual Result
It changed the line to
export type D = B | (A & C);
which has a different meaning from the original type.
Additional Info
No response
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.38.1 |
@typescript-eslint/parser |
5.38.1 |
TypeScript |
4.8.3 |
ESLint |
8.24.0 |
node |
16.17.0 |
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin