Skip to content

[semi] does not detect missing semicolons in interface definitions or in/around type aliases #714

Closed
@lucaswerkmeister

Description

@lucaswerkmeister

Repro

{
  "rules": {
    "semi": ["error", "always"]
  }
}
interface I {
    f(): void // <-- no comma
}

type foo = {
    bar: string // <-- no comma
    baz: number // <-- no comma
} // <-- no comma

Expected Result

Errors on all the marked lines. (I wasn’t sure whether to expect a semicolon after the type alias at first, but it looks like an assignment and the TypeScript handbook puts semicolons there.)

Actual Result

No errors.

Additional Info

This was already brought up by @bkucera in #461 (comment); @bradzacher suggested raising a concrete issue, which as far as I can tell wasn’t done so far, so here it is.

Versions

package version
@typescript-eslint/eslint-plugin 1.12.1-alpha.5
@typescript-eslint/parser 1.12.0
TypeScript 3.5.3
ESLint 6.0.1
node 12.6.0
npm 6.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions