Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-implied-eval] False positive when using setTimeout from timers/promises #3727

Closed
3 tasks done
almeidx opened this issue Aug 11, 2021 · 3 comments · Fixed by #4049
Closed
3 tasks done

[no-implied-eval] False positive when using setTimeout from timers/promises #3727

almeidx opened this issue Aug 11, 2021 · 3 comments · Fixed by #4049
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@almeidx
Copy link

almeidx commented Aug 11, 2021

  • 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

{
  "rules": {
    "@typescript-eslint/no-implied-eval": 2
  }
}
import { setTimeout } from 'timers/promises';
// or 
import { setTimeout } from 'node:timers/promises';

// Errors with: Implied eval. Consider passing a function.
setTimeout(1000);

Expected Result

I expected there to be no errors.

Actual Result

The no-implied-eval rule falsely triggers on the setTimeout function

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 4.29.1
@typescript-eslint/parser 4.29.1
TypeScript 4.3.5
ESLint 7.32.0
node 16.6.1
@almeidx almeidx added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Aug 11, 2021
@bradzacher
Copy link
Member

The rule currently does not support functions that shadow the global functions and change their functionality.

@bradzacher bradzacher added enhancement New feature or request and removed triage Waiting for maintainers to take a look labels Aug 16, 2021
@alii

This comment has been minimized.

@bradzacher
Copy link
Member

With any issue in opened in this project - it either has a visible progress in the form of an attached PR, or it has no progress.

We are a community run project. The volunteer maintainers spend most of their time triaging issues and reviewing PRs. This means that most issues will not progress unless a member of the community steps up and champions it.

If this issue is important to you - consider being that champion.

If not - please just subscribe to the issue and wait patiently.
Commenting asking for status updates does not bump issue priority in any way and just serves to spam everyone subscribed to the issue.

@JoshuaKGoldberg JoshuaKGoldberg added the accepting prs Go ahead, send a pull request that resolves this issue label Oct 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
4 participants