Skip to content

[promise-function-async] False positives with functions that return any #369

Closed
@sindresorhus

Description

@sindresorhus

Repro

{
  "rules": {
    "typescript/promise-function-async": "error"
  }
}
function trim(query) {
	return query.trim();
}

Expected Result

I expected the rule to only report on functions that return a promise.

Actual Result

It reports on functions returning any.

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 1.5.0
@typescript-eslint/parser 1.5.0
TypeScript 3.3.3333
ESLint 5.15.3
node 10.15.1
npm 6.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancement: plugin rule optionNew rule option for an existing eslint-plugin rulehas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions