Bug: sort-type-union-intersection-members breaks code combining & and | #6158
Labels
duplicate
This issue or pull request already exists
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=4.9.3&sourceType=module&code=C4TwDgpgBAglC8UDeUCGAuKAiGWDcUAvgFCiRQBCCyUARplhfkaeNAMLUoDGD7zJVuQAi1ABScAPpQCUUAGSw8xIA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6ZAe2jqNNtiaUOTWs3yJoyRGXxCRAW0TyARhNQZIE6F0jgwAXxD6gA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA
Repro Code
ESLint Config
tsconfig
Expected Result
I expected that it would change the line to
Actual Result
It changed the line to
which has a different meaning from the original type.
Additional Info
No response
Versions
@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
The text was updated successfully, but these errors were encountered: