When XO is installed alongside TypeScript 5.7 and tsconfig.json .compilerOptions.lib includes "ESNext.Promise", the XO CLI reports a parsing error.
{
"private": true,
"type": "module",
"packageManager": "[email protected]+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab",
"dependencies": {
"typescript": "~5.7.2",
"xo": "^0.59.3"
}
}
{
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"lib": [
"DOM",
"ES2023",
"ESNext.Promise"
],
"module": "ES2022",
"moduleResolution": "Bundler",
"noEmitOnError": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"strict": true,
"target": "ES2023"
},
"include": [
"main.ts"
],
"exclude": [
"**/node_modules"
]
}
console.log(typeof Promise.withResolvers);
./node_modules/.bin/xo --fix
main.ts
✖ Parsing error: Invalid value for lib provided: es2024.promise
1 error
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too