Skip to content

docs: add global variable rule disabling FAQ for ESLint #9865

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

Conversation

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

Adds similar examples to what's in the docs issue, along with suggested remediations, tips on disable comments, and a link to the two issues.

💖

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

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.

Copy link

netlify bot commented Aug 22, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 69dc455
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/66cb5b097841760008d1f26d
😎 Deploy Preview https://deploy-preview-9865--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

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

Copy link

nx-cloud bot commented Aug 22, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 69dc455. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@Josh-Cena
Copy link
Member

  1. This should be in the FAQ of the individual rules since there are only two involved.
  2. I still think a configuration is the right way to go, especially no-var since you should absolutely not have global declare let, but... sure, let's have FAQ in the interim.

@JoshuaKGoldberg
Copy link
Member Author

JoshuaKGoldberg commented Aug 23, 2024

of the individual rules

We don't have a file for no-var yet though 😕 . I can add one to no-namespace.mdx on its own, but I think it's a lot more common to declare global + var...

bradzacher
bradzacher previously approved these changes Aug 23, 2024
@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Aug 23, 2024
Josh-Cena
Josh-Cena previously approved these changes Aug 24, 2024
@kirkwaiblinger
Copy link
Member

of the individual rules

We don't have a file for no-var yet though 😕 . I can add one to no-namespace.mdx on its own, but I think it's a lot more common to declare global + var...

Maybe a concise "further reading" (or similar) link in no-namespace to this FAQ would resolve this?

kirkwaiblinger
kirkwaiblinger previously approved these changes Aug 25, 2024
Copy link

codecov bot commented Aug 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.03%. Comparing base (9aeba30) to head (69dc455).
Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9865      +/-   ##
==========================================
- Coverage   88.04%   88.03%   -0.01%     
==========================================
  Files         407      407              
  Lines       13948    13941       -7     
  Branches     4078     4071       -7     
==========================================
- Hits        12280    12273       -7     
  Misses       1355     1355              
  Partials      313      313              
Flag Coverage Δ
unittest 88.03% <ø> (-0.01%) ⬇️

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

see 15 files with indirect coverage changes

@@ -137,6 +137,9 @@ You might consider using [ESLint disable comments](https://eslint.org/docs/lates

## Further Reading

{/* cspell:disable-next-line */}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I think you can configure cspell to ignore anchors using ignore patterns

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh?? OH?? That would be so nice...

I can't find anything Googling, but if you have a reference I would very very happily send a PR to enable it & remove any now-unnecessary disables/ignores.

@JoshuaKGoldberg JoshuaKGoldberg merged commit 2421575 into typescript-eslint:main Aug 28, 2024
59 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: globalThis without ignores of no-var and no-namespace
4 participants