Skip to content

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

@BBosman

Description

@BBosman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existspackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions