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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eslint-plugin): [no-implied-eval] don't report when Function is imported #2348

Merged

Conversation

soobing
Copy link
Contributor

@soobing soobing commented Aug 2, 2020

Hi, first PR in typescript-eslint. 馃槉

This PR is from #2338 issue.
When import named Function,

import { Function } from "@aws-cdk/aws-lambda";

new Function(scope, "MyLambdaFunction", { /* ... */ });
{
  "rules": {
    "@typescript-eslint/no-implied-eval": "error"
  }
}

the following error is logged:

error    Implied eval. Do not use the Function constructor to create functions  @typescript-eslint/no-implied-eval

@typescript-eslint
Copy link
Contributor

@typescript-eslint typescript-eslint bot commented Aug 2, 2020

Thanks for the PR, @soobing!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


馃檹 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@codecov
Copy link

@codecov codecov bot commented Aug 2, 2020

Codecov Report

Merging #2348 into master will decrease coverage by 0.00%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##           master    #2348      +/-   ##
==========================================
- Coverage   93.09%   93.09%   -0.01%     
==========================================
  Files         284      284              
  Lines        9097     9108      +11     
  Branches     2499     2502       +3     
==========================================
+ Hits         8469     8479      +10     
  Misses        302      302              
- Partials      326      327       +1     
Flag Coverage 螖
#unittest 93.09% <92.30%> (-0.01%) 猬囷笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
...ackages/eslint-plugin/src/rules/no-implied-eval.ts 96.55% <92.30%> (-1.33%) 猬囷笍

@bradzacher bradzacher added the bug label Aug 2, 2020
@bradzacher bradzacher changed the title [no-implied-eval] when importing name Function, error is logged fix(eslint-plugin): [no-implied-eval] don't report when Function is imported Aug 2, 2020
Copy link
Member

@bradzacher bradzacher left a comment

LGTM - thanks for your contribution!

@bradzacher bradzacher merged commit fa169e7 into typescript-eslint:master Aug 2, 2020
10 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants