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 have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
export async function sel(key: pkType): Promise<showProfileType | null> {
const data = await dataGetValidate('!LAS_MOD_User_JSON.getEmpl', {emplid: key.emplid}) as Promise<showProfileType | null>;
if (data !== null) {
return {
...data, // eslint-disable-line @typescript-eslint/no-misused-promises
removeimg: false,
removesign: false,
};
}
return null;
}
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
Expected Result
I would not expect the warning (this still worked in version 5.26.0)
Actual Result
The warning Expected 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 |