Skip to content

[@typescript-eslint/indent] False positive on function arguments with decorators #1356

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
BBosman opened this issue Dec 19, 2019 · 1 comment
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@BBosman
Copy link
Contributor

BBosman commented Dec 19, 2019

After updating from 2.7.0 to 2.12.0 (and eslint from 6.6.0 to 6.7.2) I start receiving unexpected violations on @typescript-eslint/indent without any code being changed on my side.

Repro

{
  "rules": {
    "@typescript-eslint/indent": ["error", 2]
  }
}
public constructor(
  @IClock clock: IClock,
  @IDOM dom: HTMLDOM,
  // ...
) {
  // ...
}

Expected Result

For this to be valid.

Actual Result

I get Expected indentation of 0 spaces but found 2. on the @IClock clock: IClock, line.

Additional Info

If I remove the decorators the violation isn't triggered.

Versions

package version
@typescript-eslint/eslint-plugin 2.12.0
@typescript-eslint/parser 2.12.0
TypeScript 3.7.3
ESLint 6.7.2
node 12.12.0
npm 6.13.4
@BBosman BBosman added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Dec 19, 2019
@bradzacher bradzacher added duplicate This issue or pull request already exists and removed triage Waiting for team members to take a look labels Dec 19, 2019
@bradzacher
Copy link
Member

duplicate of #1232

@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