mike-north/professional-ts

Yarn@4 pnp breaks vscode / eslint integration

Closed this issue · 1 comments

Installing the latest yarn@4 uses pnp rather than node-modules. This prevents VSCode from finding the eslint and @types/jest dependencies.

If in notes/04-mikes-ts-setup.md you find that the lint test (swapping const for let) does not error in VSCode but does fail when running yarn lint then run:

yarn config set nodeLinker node-modules
yarn install

This should install dependencies in the local node_modules folder where VSCode can resolve them.

Seems to have been the case since yarn@2, see https://stackoverflow.com/a/60043794