Closed ko-vasilev closed 5 years ago
The error seems to be:
Info 10 [15:32:34.80] Plugin activation failed: TypeError: project.getCurrentDirectory is not a function
Typescript 2.5.3 Windows 10 - version 1903 (OS Build 18362.295) if that matters VS Code about text:
Version: 1.37.1 (user setup)
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:17:55.855Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362
https://github.com/microsoft/vscode-typescript-tslint-plugin/issues/61#issuecomment-494823720
Ah if I change VS Code's TS version to 3.X+, then it will work again! I see you're using 2.5.3, which could be why it's not working!
That's nice to know, but I can't upgrade from 2.5.3 at the moment.
Yes, this plugin requires TS 3.0+
Can we have some kind of warning about that on extension main page saying that if you are using typescript <3.0 switch to TSLint (deprecated)
extension?
Thanks.
@ko-vasilev Not sure if this helps, but my project is not using 3+ as well (2.8), and I just npm installed TS3+ for VS Code to use, and project linters and ts compiler will still stick with project's TS version in package.json
!
@tihuan I have 3+ installed for VSCode, but I have 2.4.3 enabled for my project. I don't think it's a good idea to use typescript version drastically different from the version used in the project because it could potentially allow you to use the typescript features your project doesn't support.
@ko-vasilev ahh I see your point!
Just out of curiosity, for "potentially using TS3 features in TS2 projects", My project is set up to throw compilation error when TS is unhappy (instead warnings), so if I accidentally use a TS3 feature, the app won't compile.
Perhaps your project setup is different?
@tihuan there are just no benefits of using TS version different from the one configured for the project with possibility of loosing some time during development.
@ko-vasilev Ah got it, that makes sense 👌!
The plugin doesn't seem to show any errors for me while the deprecated one is working just fine (https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin). Here's the terse log: