Skip to content
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

[sort-type-union-intersection-members] void should be in nullish group #2940

Closed
3 tasks done
avaly opened this issue Jan 18, 2021 · 0 comments · Fixed by #2944
Closed
3 tasks done

[sort-type-union-intersection-members] void should be in nullish group #2940

avaly opened this issue Jan 18, 2021 · 0 comments · Fixed by #2944
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@avaly
Copy link
Contributor

avaly commented Jan 18, 2021

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

void is currently included in the keyword group, but it fits better with the nullish group.

{
  "rules": {
    "@typescript-eslint/sort-type-union-intersection-members": [2, {
      "groupOrder": [
        "literal",
        "keyword",
        "named",
        "operator",
        "function",
        "import",
        "conditional",
        "object",
        "tuple",
        "intersection",
        "union",
        "nullish"
      ]
  }
}
type Foo = void | ObjectId | null | undefined;

Expected Result

type Foo = ObjectId | null | undefined | void;

Actual Result

type Foo = void | ObjectId | null | undefined;

Versions

package version
@typescript-eslint/eslint-plugin 4.13.0
@typescript-eslint/parser 4.13.0
TypeScript 4.1.3
ESLint 7.13.0
node 14.15.0
@avaly avaly added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Jan 18, 2021
@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for maintainers to take a look labels Jan 19, 2021
bradzacher added a commit that referenced this issue Jan 19, 2021
bradzacher added a commit that referenced this issue Jan 19, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants