Reputation: 7367
Cloned the tslint
repository, did npm install
and grunt
, as told in the README, and opened the folder in Visual Studio Code (0.9.1). Looking at any .ts
file - src/rules/typedefRule.ts
, say - gives TypeScript errors on require "typescript"
: Cannot find module 'typescript'.
The typescript
module is in the node_modules
folder, but VSC doesn't seem to know about that. How do I tell it to?
Upvotes: 1
Views: 3335
Reputation: 276161
The typescript module is in the node_modules folder, but VSC doesn't seem to know about that. How do I tell it to?
Two things:
vscode
uses doesn't support typings
lookup. You will need to update it to latest (typescript nightly) using the tssdk
setting1.6.2
) doesn't have typings
field. You need to update tslint as well (a much bigger task). Suggestion: Follow the other steps in readme and use THEIR definition file : https://github.com/palantir/tslint#custom-rules
Upvotes: 0