Closed JoshuaKGoldberg closed 2 months ago
https://eslint-plugin-perfectionist.azat.io/rules/sort-union-types exists for union types, but what about intersection types?
// ❌ Incorrect type Both = & { b: 1 } & { a: 1 } // ✅ Correct type Both = & { a: 1 } & { b: 1 }
We intentionally named https://typescript-eslint.io/rules/sort-type-constituents as "type constituents" because that refers to the constituents in both intersection and union types. Fun fact!
Nice idea! I'll add it. ❤️️️
Describe the rule
https://eslint-plugin-perfectionist.azat.io/rules/sort-union-types exists for union types, but what about intersection types?
Code example
Additional comments
We intentionally named https://typescript-eslint.io/rules/sort-type-constituents as "type constituents" because that refers to the constituents in both intersection and union types. Fun fact!
Validations