Zakk
Zakk

Reputation: 768

tslint is not working in visual studio code

I installed the tslint add-on in top of my angularJS project in visual studio code.

The issue that its not working, I can't see any error begin shown in the editor.

I made sure the tslint add-on is enabled in the extensions tab.

I checked in vscode settings and also tslint is enabled for typescript files.

In tslint console I can see this warning:

[Warn  - 10:19:51 PM] vscode-tslint: Cannot read tslint configuration - 'Cannot read property 'findConfigurationPath' of undefined'

Can you please help me fix this issue?

Thanks

Upvotes: 4

Views: 9006

Answers (1)

Suxino
Suxino

Reputation: 169

It means that you are missing tslint config file. tslint.json Here is a guide on how to config it it https://palantir.github.io/tslint/usage/configuration/

If you have tslint installed globally as node package you can run tslint --init and it will create the file with default config

If you have tslint installed as local package run npx tslint --init (this requires npm v5+ i think)

Upvotes: 4

Related Questions