-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
module.exports = {
env: {
browser: true,
amd: true,
node: true,
},
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['tsconfig.json'],
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/no-floating-promises': [2],
'@typescript-eslint/strict-boolean-expressions': [2],
"require-await": "off",
"@typescript-eslint/no-misused-promises": [2]
}
};
const foo = async () => console.log('a')
foo()
const bar = foo()
Expected Result
Both the second and third lines should be linted.
Actual Result
only the second line gets linted
Additional Info
I think assigning unresolved promises doesn't trigger no-floating-promises
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.22.1 |
@typescript-eslint/parser |
4.22.1 |
TypeScript |
3.9.7 |
ESLint |
7.25.0 |
node |
14.16.1 |
Metadata
Metadata
Assignees
Labels
package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended