Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

Eslint Issue: `The file does not match your project config... The file must be included in at least one of the projects provided` #5136

Closed zeeshanakram3 closed 4 months ago

zeeshanakram3 commented 5 months ago

Issue

All the typescript source files in all of the packages in monorepo are showing the following error, when you open the file in Vscode.

Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: query-node/mappings/src/content/channel.ts.
The file must be included in at least one of the projects provided.eslint

This issue can also be reproduced if you run eslint command from monorepo root. e.g.

$ npx eslint  ./tests/network-tests/
...
/workspace/joystream/tests/network-tests/src/utils.ts
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: tests/network-tests/src/utils.ts.
The file must be included in at least one of the projects provided
✖ 234 problems (234 errors, 0 warnings)

Cause

The reason is that there is include option in the root tsconfig.json file, which was added in https://github.com/Joystream/joystream/pull/4871, and subsequently this bug was moved to master branch with nara release

Fix

Remove include option from the root tsconfig.json file