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
Just as I'm using rm -rf node_modules package-lock.json && npm install regularly xo suddenly stopped working yesterday. First thought, probably some eslint error, they will release another patch version. I just head to sleep and everything will be fine in the morning. Nothing happened till now so I went into investigating it further.
Error Message:
Error: Error while loading rule '@typescript-eslint/await-thenable': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Occurred while linting /home/edjopato/tmp/xo-testing/index.ts
at Object.getParserServices (/home/edjopato/tmp/xo-testing/node_modules/@typescript-eslint/experimental-utils/dist/eslint-utils/getParserServices.js:15:15)
at create (/home/edjopato/tmp/xo-testing/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js:30:37)
at Object.create (/home/edjopato/tmp/xo-testing/node_modules/@typescript-eslint/experimental-utils/dist/eslint-utils/RuleCreator.js:12:24)
at createRuleListeners (/home/edjopato/tmp/xo-testing/node_modules/eslint/lib/linter/linter.js:746:21)
at /home/edjopato/tmp/xo-testing/node_modules/eslint/lib/linter/linter.js:916:31
at Array.forEach (<anonymous>)
at runRules (/home/edjopato/tmp/xo-testing/node_modules/eslint/lib/linter/linter.js:861:34)
at Linter._verifyWithoutProcessors (/home/edjopato/tmp/xo-testing/node_modules/eslint/lib/linter/linter.js:1157:31)
at Linter._verifyWithoutProcessors (/home/edjopato/tmp/xo-testing/node_modules/eslint-plugin-eslint-comments/lib/utils/patch.js:165:42)
at Linter._verifyWithConfigArray (/home/edjopato/tmp/xo-testing/node_modules/eslint/lib/linter/linter.js:1255:21)
While trying to figure out what exactly went wrong i tried multiple versions in a clean project folder just containing package.json and an index.ts file.
typescript and eslint-config-xo-typescript does not seem to have any impact but are required as dependencies (for older xo versions). I installed all versions of xo from 0.27.0 until the current latest of 0.28.1 with either eslint packages of 2.26.0 or 2.25.0.
(adapt package.json then rm -rf node_modules package-lock.json && npm install && npx xo)
When using eslint packages 0.25.0 every xo version works fine.
When using eslint packages 0.26.0 only xo version 0.27.0 works fine indicating the problem arrived in xo 0.27.1. The release notes pointed me towards the PR #431 "Various fixes to TypeScript integration" which sounds like something that could indeed break something with eslint-typescript. I have not enough understanding of the xo code to understand the problem that might be introduced there. The problem might also be in some bug of the eslint packages 0.26.0 but there isnt any issue there regarding something like that (yet?).
Sadly i can not pinpoint the problem towards eslint or xo but as it changes with the earlier mentioned PR in xo I tend towards xo.
For everyone just looking for a quick workaround for now in order to work with the latest xo:
npm i -D xo@latest
npm i -D --save-exact @typescript-eslint/eslint-plugin@2.25.0 @typescript-eslint/parser@2.25.0
The text was updated successfully, but these errors were encountered:
@sindresorhus@pvdlg
I did some digging on this and it looks like @typescript-eslint/typescript-estree now defaults to ignoring typescript project files if it is in node_modules (which is where the cached auto-gen'd copy lives)
Just as I'm using
rm -rf node_modules package-lock.json && npm install
regularly xo suddenly stopped working yesterday. First thought, probably some eslint error, they will release another patch version. I just head to sleep and everything will be fine in the morning. Nothing happened till now so I went into investigating it further.Error Message:
While trying to figure out what exactly went wrong i tried multiple versions in a clean project folder just containing package.json and an index.ts file.
typescript
andeslint-config-xo-typescript
does not seem to have any impact but are required as dependencies (for older xo versions). I installed all versions of xo from 0.27.0 until the current latest of 0.28.1 with either eslint packages of 2.26.0 or 2.25.0.(adapt package.json then
rm -rf node_modules package-lock.json && npm install && npx xo
)When using eslint packages 0.25.0 every xo version works fine.
When using eslint packages 0.26.0 only xo version 0.27.0 works fine indicating the problem arrived in xo 0.27.1. The release notes pointed me towards the PR #431 "Various fixes to TypeScript integration" which sounds like something that could indeed break something with eslint-typescript. I have not enough understanding of the xo code to understand the problem that might be introduced there. The problem might also be in some bug of the eslint packages 0.26.0 but there isnt any issue there regarding something like that (yet?).
Sadly i can not pinpoint the problem towards eslint or xo but as it changes with the earlier mentioned PR in xo I tend towards xo.
For everyone just looking for a quick workaround for now in order to work with the latest xo:
The text was updated successfully, but these errors were encountered: