Closed JoshuaKGoldberg closed 2 months ago
sort-enums
partition-by-comment
sort-objects
But, TypeScript enums also experience the same root behavior as #22. Could we also add the option to the sort-enums rule please?
https://github.com/typescript-eslint/typescript-eslint/blob/25ea953cc60b118bd385c71e0a9b61c286c26fcf/packages/ast-spec/src/ast-token-types.ts has an example enum that intentionally moves some properties to the end.
export enum AST_TOKEN_TYPES { Boolean = 'Boolean', Identifier = 'Identifier', JSXIdentifier = 'JSXIdentifier', JSXText = 'JSXText', Keyword = 'Keyword', Null = 'Null', Numeric = 'Numeric', Punctuator = 'Punctuator', RegularExpression = 'RegularExpression', String = 'String', Template = 'Template', // comment types Block = 'Block', Line = 'Line', }
I'd be happy to send this PR if it's essentially a copy & paste of #23! 🙂
Released in v2.7.0.
Awesome, thanks @azat-io! 🙏
Thanks to @chirokas ❤️
What rule do you want to change?
sort-enums
Describe the problem
23 added a
partition-by-comment
option to thesort-objects
rule (thanks again!). Which is great. No complaints for objects!But, TypeScript enums also experience the same root behavior as #22. Could we also add the option to the
sort-enums
rule please?https://github.com/typescript-eslint/typescript-eslint/blob/25ea953cc60b118bd385c71e0a9b61c286c26fcf/packages/ast-spec/src/ast-token-types.ts has an example enum that intentionally moves some properties to the end.
Code example
Additional comments
I'd be happy to send this PR if it's essentially a copy & paste of #23! 🙂
Validations