Skip to content

[lines-around-comment] Does not respect interfaces #1150

Closed
@yordis

Description

@yordis

I am not sure where to open this since the rule is not from typescript-eslint but since it only happens with TypeScript interfaces I am looking for direction.

Repro

{
  "rules": {
    "lines-around-comment": [
      "error",
      {
        "beforeBlockComment": true,
        "afterBlockComment": false,
        "beforeLineComment": true,
        "afterLineComment": false,
        "allowBlockStart": true,
        "allowBlockEnd": false,
        "allowObjectStart": true,
        "allowObjectEnd": false,
        "allowArrayStart": true,
        "allowArrayEnd": false,
        "allowClassStart": true,
        "allowClassEnd": false,
      },
    ],
  }
}
// your repro code case

export interface IStartCommandOptions {
  /**
   * This will throw an error using
   */
  dangerouslyDisableHostCheck: boolean;
}

Expected Result
Shouldn't fail using interfaces

Actual Result

error  Expected line before comment  lines-around-comment

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 2.5.0
@typescript-eslint/parser 2.5.0
TypeScript 3.6.4
ESLint 6.6.0
node 10.16.1
npm 6.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueenhancement: new base rule extensionNew base rule extension required to handle a TS specific caseformattingRelated to whitespace/bracket formatting. We strongly recommend you use a formatter instead.package: 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