Skip to content

[indent] Incorrect indentation expected for multi-line decorated parameters #640

@affanshahid

Description

@affanshahid

Repro

{
  "rules": {
    "indent": "off",
    "@typescript-eslint/indent": [
        "error",
        2
    ],
  }
}
const log = function (target: Object, method: string, index: number) {
  console.log('decorating %s[%d]', method, index);
}


export class ProgramsController {
  getProgramById(
    @log
    id: string, // error shows up on this line
  ) {
    return this.programsService.getProgramById(id);
  }
}

Expected Result
No indentation errors
Actual Result
Expected indentation of 6 spaces but found 4. eslint(@typescript-eslint/indent)
Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 1.10.2
@typescript-eslint/parser 1.10.2
TypeScript 3.5.2
ESLint 5.16.0
node 12.2.0
npm 6.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions