Closed probert94 closed 5 years ago
Can you please share more from the logs. There should be a section near the top where it tries to load the plugin and that could be failing
I just had a look at the log but the plugin seems to load successfully:
Info 36 [16:50:46.59] Loading global plugin typescript-tslint-plugin Info 37 [16:50:46.59] Enabling plugin typescript-tslint-plugin from candidate paths: c:/Angular/my-app/node_modules/typescript/lib/tsserver.js/../../..,C:\Users\User.vscode-insiders\extensions\ms-vscode.vscode-typescript-tslint-plugin-1.0.0 Info 38 [16:50:46.60] Loading typescript-tslint-plugin from c:/Angular/my-app/node_modules/typescript/lib/tsserver.js/../../.. (resolved to c:/Angular/my-app/web/portal/node_modules/node_modules) Info 39 [16:50:46.149] [typescript-tslint-plugin] "Create" Info 40 [16:50:46.149] [typescript-tslint-plugin] "ConfigurationManager: Found configured project: c:/Angular/my-app/tsconfig.json" Info 41 [16:50:46.149] [typescript-tslint-plugin] "loaded" Info 42 [16:50:46.150] Plugin validation succeded
However, I noticed the following at the end of the log:
Info 7844 [16:51:41.77] [typescript-tslint-plugin] "Computing tslint semantic diagnostics for 'c:/Angular/my-app/apps/my-app/src/app/model/Client.ts'" Info 7845 [16:51:41.77] [typescript-tslint-plugin] "start validateTextDocument" Info 7846 [16:51:41.77] [typescript-tslint-plugin] "validateTextDocument: about to load tslint library" Info 7847 [16:51:41.77] [typescript-tslint-plugin] "validateTextDocument: loaded tslint library" Info 7848 [16:51:41.77] [typescript-tslint-plugin] "About to validate c:/Angular/my-app/apps/my-app/src/app/model/Client.ts'" Info 7849 [16:51:41.77] [typescript-tslint-plugin] "start doValidate c:/Angular/my-app/apps/my-app/src/app/model/Client.ts'" Info 7850 [16:51:41.77] [typescript-tslint-plugin] "Changed directory to c:/Angular/my-app" Info 7851 [16:51:41.77] [typescript-tslint-plugin] "validateTextDocument: about to getConfiguration" Info 7852 [16:51:41.77] [typescript-tslint-plugin] "getConfiguration forc:/Angular/my-app/apps/my-app/src/app/model/Client.ts'" Info 7853 [16:51:41.77] [typescript-tslint-plugin] "validateTextDocument: configuration fetched" Info 7854 [16:51:41.77] [typescript-tslint-plugin] "Linting: start linting" Info 7855 [16:51:41.79] [typescript-tslint-plugin] "tslint error ENOENT: no such file or directory, open 'c:\Angular\my-app\node_modules\typescript\lib/angular.json'"
I then enabled the VS Code-Version of the log, to be able to compare them and there, this tslint error ENOENT
is missing.
I just installed the lastest typescript-tslint-plugin
version (0.3.1) using npm install --save-dev typescript-tslint-plugin
and I am using Typescript 3.2.4
Are you using Nx Workspace? Can you share your tslint.json rulesDirectory property? We have the same issue. Seems like a linting rule from @nrwl/schematics depends on angular.json and can't find it when using workspace version of Typescript. There is an issue on their repo.
@rodbecc I am using Nx Workspace and my rulesDirectory
looks like this:
"rulesDirectory": [
"node_modules/codelyzer",
"node_modules/@nrwl/schematics/src/tslint"
],
Thanks for pointing me to the issue in Nx!
I tryed to remove the rulesDirectory
for @nrwl/nx
and the plugin works fine now.
So this issue can be closed, since it is not an issue with the plugin, but with @nrwl/nx
.
In an Angular-Project, I am trying to replace the TSLint plugin with this plugin.
I am using VS Code Insiders (1.32.0-insider) and I am trying to configure the plugin to use the workspace version of typescript, which is currently 3.2.4. As the documentation says, that I only need to manually configure the TS Server, if I am using a workspace version in VS Code <= 1.30, all I did was disable the TSLint-Plugin and enable this one.
However, I don't get any Lint-Warnings. As soon as I activate VS Code's typescript version, it works as expected.
So I tryed to install "typescript-tslint-plugin" locally using
npm install --save-dev typescript-tslint-plugin
and I even add theplugin
-section to mytsconfig.json
but it still did not work. Installing it gloablly, usingnpm install -g typescript-tslint-plugin
did not help either.Here is the tsserver.log output, without configuring tsconfig.json:
Am I missing something?