You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> xo
a.ts:1:7
✖ 1:7 a is assigned a value but never used. @typescript-eslint/no-unused-vars
b.ts:undefined:undefined
✖ 0:0 Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: b.ts.
The file must be included in at least one of the projects provided.
2 errors
Ok, I guess, tsconfig.json is:
{
"include": [
"a.ts"
]
}
➡️ Change it to include the missing file:
{
"include": [
"a.ts",
"b.ts"
]
}
➡️ Run:
npm test
❌ Same result as above. It's still complaining that b.ts isn't included but it's included. Crazy.
➡️ Run:
trash node_modules # or # rm -rf node_modules
npm i
npm test
✅ It works.
I also included .eslintrc with which you can verify that eslint isn't doing this. Replace test in package.json with eslint *.ts
The text was updated successfully, but these errors were encountered:
This is probably caused by xo's caching, which is really just ESLint's caching. I guess TypeScript-ESLint doesn't correctly update the cache or something.
Have same issue. I use xo and eslint both in one project. xo for cli and eslint for WebStorm.
node_modules removal helps. @fregante thank you for the workaround.
Repro.zip
➡️ Run:
npm i npm test
❌ You get:
Ok, I guess,
tsconfig.json
is:➡️ Change it to include the missing file:
➡️ Run:
npm test
❌ Same result as above. It's still complaining that
b.ts
isn't included but it's included. Crazy.➡️ Run:
✅ It works.
I also included
.eslintrc
with which you can verify thateslint
isn't doing this. Replacetest
inpackage.json
witheslint *.ts
The text was updated successfully, but these errors were encountered: