Skip to content

[@typescript-eslint/indent] False positives in enums #1701

Closed
@neurolag

Description

@neurolag

Repro

{
  "rules": {
    "@typescript-eslint/indent": "warn"
  }
}
export enum LogLevel {
    Info,
    Warning
}

export enum LogLevel
{ // Expected indentation of 4 spaces but found 0. (@typescript-eslint/indent)
    Info,
    Warning
}

Expected Result
Both examples should work as expected.

Actual Result
An error is reported in the second example.

Versions

package version
@typescript-eslint/eslint-plugin 2.22.1-alpha.6
@typescript-eslint/parser 2.22.0
TypeScript 3.8.3
ESLint 6.8.0
node v12.4.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