microsoft / vscode-typescript-tslint-plugin

VS Code extension that provides TSLint support using the typescript-tslint-plugin
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin
MIT License
188 stars 35 forks source link

tslint:disable-next-line: max-line-length doesn't work before typescript multiline template string #74

Closed doradsoft closed 5 years ago

doradsoft commented 5 years ago

While putting

// tslint:disable-next-line: max-line-length

before a multiline template string block which contains a long line, warning is still presented.

Reproduce:

// tslint:disable-next-line: max-line-length `\<html> lonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnngggggggggggggggggggggggggggggggggggggggggggg linnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnne \<\/html>`

mjbvz commented 5 years ago

Do you also see this issue when running tslint from the command line?

glen-84 commented 5 years ago

Use:

// tslint:disable:max-line-length
`<html>
lonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnngggggggggggggggggggggggggggggggg linnnnnnnnnnnnnnnnnnnnnnnnnnne
</html>`;
// tslint:enable:max-line-length

disable-next-line is for a single line.

Regardless, you should report such issues here in future. This repository is for the VS Code extension, not TSLint itself.

mjbvz commented 5 years ago

Closing as external tslint issue