Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed as not planned
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 havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Playground Link
Repro Code
typeA={a:"A";}typeB={b:"B";}typeC={c:"C";}// this line violates@typescript-eslint/sort-type-union-intersection-membersexporttypeD=(C|B)&A;
ESLint Config
{"extends":["plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/sort-type-union-intersection-members":"warn"}}
tsconfig
{"compilerOptions": {// ... }}Expected Result
I expected that it would change the line to
exporttypeD=A&(B|C);
Actual Result
It changed the line to
exporttypeD=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 |