Tslint: semicolon rule incorrectly applied inside of interface declarations

Created on 9 Oct 2016  路  2Comments  路  Source: palantir/tslint

Bug Report

  • TSLint version: 3.15.1
  • TypeScript version: 2.0.3
  • Running TSLint via: grunt-tslint

    TypeScript code being linted

interface PollLinkOptions {
    account: { domain: string },
    poll: { uid: string },
    emailToken: string
};

with tslint.json configuration:

{
    "rules": {
        "semicolon": [
            true,
            "always"
        ]
}

Actual behavior

(semicolon) routes/links.ts[2, 30]: Missing semicolon
(semicolon) routes/links.ts[3, 24]: Missing semicolon
(semicolon) routes/links.ts[4, 20]: Missing semicolon

Expected behavior

Should not be treated as an error.

Fixed

Most helpful comment

@nonplus was having the same issue and stumbled across the tslint option ignore-interfaces, which would give you a configuration of

{
    "rules":  {
        "semicolon": [
            true,
           "always",
           "ignore-interfaces"
        ]
    }
}

Picked it up from here https://palantir.github.io/tslint/rules/semicolon/

All 2 comments

@nonplus was having the same issue and stumbled across the tslint option ignore-interfaces, which would give you a configuration of

{
    "rules":  {
        "semicolon": [
            true,
           "always",
           "ignore-interfaces"
        ]
    }
}

Picked it up from here https://palantir.github.io/tslint/rules/semicolon/

Awesome, looks like this is fixed! 馃帀

Was this page helpful?
0 / 5 - 0 ratings