Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Playground Link
Repro Code
exportasyncfunctionsel(key:pkType):Promise<showProfileType|null>{constdata=awaitdataGetValidate('!LAS_MOD_User_JSON.getEmpl',{emplid:key.emplid})asPromise<showProfileType|null>;if(data!==null){return{...data,// eslint-disable-line @typescript-eslint/no-misused-promisesremoveimg:false,removesign:false,};}returnnull;}
ESLint Config
{"parser":"/Users/doberkofler/MyDev/ljs_app/trunk/periscope/node_modules/@typescript-eslint/parser/dist/index.js","parserOptions":{"project":["./tsconfig.json","./test/selenium/tsconfig.json"]},"plugins":["@typescript-eslint"],"rules":{"@typescript-eslint/no-misused-promises":"error"}}
tsconfig
{"compilerOptions": {"allowJs":true,"checkJs":false,"skipLibCheck":true,"noEmit":true,"downlevelIteration":true,"sourceMap":true,"strict":true,"noImplicitAny":true,"strictNullChecks":true,"noImplicitThis":false,"noUnusedLocals":true,"noUnusedParameters":false,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"noUncheckedIndexedAccess":false,"useUnknownInCatchVariables":true,"exactOptionalPropertyTypes":false,"esModuleInterop":true,"declaration":false,"importHelpers":true,"moduleResolution":"node","target":"es2017","module":"esnext","jsx":"react","baseUrl":"../","outDir":"../temp","removeComments":true,"lib": ["dom" ],"paths": {"@alias_root/*": ["./*" ] } },"compileOnSave":false,"include": ["src/**/*","test/unittest/**/*" ],"exclude": ["node_modules" ]}
Expected Result
I would not expect the warning (this still worked in version 5.26.0)
Actual Result
The warningExpected a non-Promise value to be spreaded in an object @typescript-eslint/no-misused-promises
in shown since the upgrade to version 5.27.0
Additional Info
Unfortunately, I was not able to reproduce the error in the playground
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 5.27.0 |
@typescript-eslint/parser | 5.27.0 |
TypeScript | 4.7.2 |
ESLint | 8.16.0 |
node | 18.1.0 |