8000 [sort-type-constituents] Feature request: support case sensitive sorting · Issue #4602 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

[sort-type-constituents] Feature request: support case sensitive sorting #4602

8000
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iliubinskii opened this issue Feb 27, 2022 · 1 comment · Fixed by #8760
Closed

[sort-type-constituents] Feature request: support case sensitive sorting #4602

iliubinskii opened this issue Feb 27, 2022 · 1 comment · Fixed by #8760
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement: plugin rule option New rule option for an existing eslint-plugin rule locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@iliubinskii
Copy link

Repro

type T = "DeleteForever" | "DeletedAt";

Expected Result

With new feature should leave as is.

Actual Result

There is currently no way to use case sensitive sorting.

Additional Info

  1. New option will help make this rule consistent with other sorting-related rules.
  2. When you have values consisting of several words (like "DeleteForever", "DeletedAt"), case sensitive sorting is more logical. Compare it to kebabcase: "delete-forever", "deleted-at" is more natural.
  3. For case-sensitive language (e.g. typescript) case sensitive sorting is good option.

Also, natural number order may also be turned on/off with an option.

@iliubinskii iliubinskii added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Feb 27, 2022
@bradzacher bradzacher added accepting prs Go ahead, send a pull request that resolves this issue enhancement: plugin rule option New rule option for an existing eslint-plugin rule and removed triage Waiting for team members to take a look labels Feb 27, 2022
@JoshuaKGoldberg JoshuaKGoldberg changed the title [sort-type-union-intersection-members] Feature request: support case sensitive sorting [sort-type-constituents] Feature request: support case sensitive sorting Feb 24, 2024
@JoshuaKGoldberg
Copy link
Member

Note that we're feature-freezing sort-type-constituents and other naming & sorting stylistic rules: #8792. Since this received a PR (#8760) before #8792 was filed, we'll still accept that PR. But if #8760 is closed then we'll close this issue too.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2024
@bradzacher bradzacher added the locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. label Apr 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement: plugin rule option New rule option for an existing eslint-plugin rule locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
3 participants
0