Closed Xapphire13 closed 7 years ago
When multiple rules (one of which being prefer-const) target the same line and you use --fix, the code generated isn't valid TypeScript
prefer-const
--fix
function test() { let foo= "foo"; let foobar = foo + "bar" }
with tslint.json configuration:
tslint.json
{ "defaultSeverity": "warning", "rules": { "prefer-const": true, "semicolon": true, "whitespace": [ true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type" ] } }
function test() { const f oo= "foo"; const foobar = foo + ";bar" }
function test() { const foo = "foo"; const foobar = foo + "bar"; }
related: #2326, #2606, #2556
Bug Report
When multiple rules (one of which being
prefer-const
) target the same line and you use--fix
, the code generated isn't valid TypeScriptTypeScript code being linted
with
tslint.json
configuration:Actual behavior
Expected behavior