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

infra(eslint): limit usage of globals in src #3191

Merged
merged 4 commits into from
Oct 19, 2024
Merged

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Oct 17, 2024

Fixes #3145

Ban the usage of globals in our src folder.
All usages of these globals have to be marked with a eslint disable rule making them easier to spot.

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: infra Changes to our infrastructure or project setup labels Oct 17, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Oct 17, 2024
@ST-DDT ST-DDT requested review from a team October 17, 2024 19:23
@ST-DDT ST-DDT self-assigned this Oct 17, 2024
Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 0dab34f
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/6712b443cae7a40008c4622a
😎 Deploy Preview https://deploy-preview-3191.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

eslint.config.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (9014715) to head (0dab34f).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3191      +/-   ##
==========================================
- Coverage   99.97%   99.96%   -0.01%     
==========================================
  Files        2798     2798              
  Lines      227335   227335              
  Branches      958      957       -1     
==========================================
- Hits       227268   227260       -8     
- Misses         67       75       +8     
Files with missing lines Coverage Δ
src/internal/base64.ts 30.00% <ø> (ø)
src/internal/deprecated.ts 100.00% <ø> (ø)
src/modules/helpers/eval.ts 94.69% <ø> (ø)

... and 2 files with indirect coverage changes

eslint.config.ts Outdated Show resolved Hide resolved
@ST-DDT ST-DDT requested a review from a team October 18, 2024 14:01
@xDivisionByZerox
Copy link
Member

What happened to the original implementation where globals that are not specific to an environment were allowed?

@ST-DDT
Copy link
Member Author

ST-DDT commented Oct 18, 2024

What happened to the original implementation where globals that are not specific to an environment were allowed?

It was never added to our source and this solution was recommended to me by members of eslint.

@ST-DDT
Copy link
Member Author

ST-DDT commented Oct 18, 2024

Also AFAIK we don't actually want to use any additional globals anyway.

@ST-DDT ST-DDT merged commit 7141608 into next Oct 19, 2024
23 checks passed
@ST-DDT ST-DDT deleted the eslint/no-undefined-globals branch October 19, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: infra Changes to our infrastructure or project setup p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent usage of features not broadly available
3 participants