microsoft/tslint-microsoft-contrib

no-backbone-get-set-outside-model has obscenely long rule warnings

JoshuaKGoldberg opened this issue · 0 comments

Bug Report

  • tslint-microsoft-contrib version: 6.0.0
  • TSLint version: 5.11.0
  • TypeScript version: 3.1.2
  • Running TSLint via: CLI

TypeScript code being linted

var datetime = model.get('timestamp');

// ...more code

with tslint.json configuration:

{
    "rules": {
        "no-backbone-get-set-outside-model": [true]
    }
}

Actual behavior

Rule failure should just be that one line

Expected behavior

In the rule's source:

this.addFailureAt(node.getStart(), node.getEnd(), msg);

node.getEnd() is passed to the width parameter of this.addFailureAt, so the length increases the further done the file the failure is. Lol.

Found as part of #489 - good reinforcement of why the TSLint test migration is good!