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

[@typescript-eslint/type-annotation-spacing] false positive #1667

Closed
crfrolik opened this issue Mar 3, 2020 · 1 comment
Closed

[@typescript-eslint/type-annotation-spacing] false positive #1667

crfrolik opened this issue Mar 3, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@crfrolik
Copy link
Contributor

crfrolik commented Mar 3, 2020

Repro

{
  "rules": {
    "@typescript-eslint/type-annotation-spacing": "error",
  }
}
type Constructor<T> = new (...args: any[]) => T;

Expected Result

No lint error.

Actual Result

  25:44  error  Unexpected space before the '=>'  @typescript-eslint/type-annotation-spacing

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

Using the --fix option produces the following:

type Constructor<T> = new (...args: any[])=> T;

Additional Info

This was a regression in v2.22.0. It did not occur in previous versions.

Versions

package version
@typescript-eslint/eslint-plugin 2.22.0
@typescript-eslint/parser 2.22.0
TypeScript 3.7.5
ESLint 6.8.0
node 13.8.0
yarn 1.22.0
@crfrolik crfrolik added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Mar 3, 2020
@bradzacher
Copy link
Member

Please use the search next time.
This has been raised and fixed.

#1663

@bradzacher bradzacher added duplicate This issue or pull request already exists and removed triage Waiting for maintainers to take a look labels Mar 4, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants