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 34 forks source link

Trying to TSlint Javascript (.js) files #26

Closed jtsom closed 5 years ago

jtsom commented 5 years ago

I have a straight up .Net Core Razor Pages application, that includes a .js file.

There isn't a tslint.conf file, there isn't any Typescript files. But for my .js file, I'm seeing this error (it's marked at the top of the file):

{
    "resource": "/c:/Users/John Tsombakos/Source/Repos/webapp/Web/wwwroot/js/app.js",
    "owner": "typescript",
    "code": "1",
    "severity": 8,
    "message": "Failed to load the TSLint library for the document c:/Users/John Tsombakos/Source/Repos/webapp/Web/wwwroot/js/app.js\nTo use TSLint for single file install tslint globally using 'npm install -g tslint'.\nTSLint has a peer dependency on `typescript`, make sure that `typescript` is installed as well.\nYou need to reopen VS Code after installing tslint.",
    "source": "tslint",
    "startLineNumber": 1,
    "startColumn": 1,
    "endLineNumber": 1,
    "endColumn": 2
}

The option

// Control whether tslint is enabled for JavaScript files or not. "tslint.jsEnable": false,

is not enabled (false, as default).

No, I do not have tslint installed globally, as it's only used in Angular projects, where it is included in their package.json files.

papiro commented 4 years ago

This was closed with no resolution?