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

fix(eslint-plugin): [no-require-imports] report only global require #3871

merged 3 commits into from Sep 21, 2021


Copy link

@rafaelss95 rafaelss95 commented Sep 12, 2021

Fixes #3713.

Copy link

@typescript-eslint typescript-eslint bot commented Sep 12, 2021

Thanks for the PR, @rafaelss95!

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 As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

Copy link

@codecov codecov bot commented Sep 12, 2021

Codecov Report

Merging #3871 (954124c) into master (4195919) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3871   +/-   ##
  Coverage   93.50%   93.51%           
  Files         151      151           
  Lines        8134     8137    +3     
  Branches     2580     2581    +1     
+ Hits         7606     7609    +3     
  Misses        167      167           
  Partials      361      361           
Flag Coverage Δ
unittest 93.51% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...ages/eslint-plugin/src/rules/no-require-imports.ts 100.00% <100.00%> (ø)

@rafaelss95 rafaelss95 changed the title fix(eslint-plugin): [no-require-imports] report only global 'require' fix(eslint-plugin): [no-require-imports] report only global require Sep 12, 2021
@bradzacher bradzacher added the bug label Sep 13, 2021
Copy link

@bradzacher bradzacher left a comment

thanks for doing this!
a few comments

@bradzacher bradzacher added the awaiting response label Sep 20, 2021
Copy link
Contributor Author

@rafaelss95 rafaelss95 commented Sep 21, 2021

instead of copy-pasting it - let's move this to an internal util within the util folder and share the code.

@bradzacher, do you want me to do this in this PR (and also use it in no-shadow)?

Actually I just realized we can simply use ASTUtils.findVariable here and even in no-shadow (I can send another PR addressing this or maybe amend it to #3868). Let me know your thoughts.

Copy link

@bradzacher bradzacher commented Sep 21, 2021

(I can send another PR addressing this or maybe amend it to #3868). Let me know your thoughts.

Feel free to make another PR - keeps it clear and attributes each contribution to you :)

@bradzacher bradzacher removed the awaiting response label Sep 21, 2021
@bradzacher bradzacher merged commit 8aa87a1 into typescript-eslint:master Sep 21, 2021
11 checks passed
@rafaelss95 rafaelss95 deleted the fix/3713 branch Sep 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

2 participants