Skip to content

feat: ignore type annotations in no-restricted-globals #19781

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

Merged
merged 3 commits into from
Jun 3, 2025

Conversation

sethamus
Copy link
Contributor

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[x] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

This PR modifies the no-restricted-globals rule to ignore restricted globals when they appear in TypeScript type annotations.

Closes #19769

Is there anything you'd like reviewers to focus on?

@sethamus sethamus requested a review from a team as a code owner May 28, 2025 10:33
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage May 28, 2025
Copy link

netlify bot commented May 28, 2025

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit accad48
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/683e937ff816f000081b7fae

@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label May 28, 2025
@github-actions github-actions bot added the rule Relates to ESLint's core rules label May 28, 2025
@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label May 28, 2025
@nzakas nzakas moved this from Needs Triage to Triaging in Triage May 28, 2025
@nzakas nzakas moved this from Triaging to Implementing in Triage May 28, 2025
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

This is looking good. I just left a few suggestions to clean things up a bit.

nzakas
nzakas previously approved these changes May 29, 2025
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM, thanks. Would like @snitin315 to verify his feedback has been addressed before merging.

snitin315
snitin315 previously approved these changes May 31, 2025
Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Leaving this open until the patch release window.

@snitin315 snitin315 moved this from Implementing to Merge Candidates in Triage May 31, 2025
@sethamus sethamus dismissed stale reviews from snitin315 and nzakas via accad48 June 3, 2025 06:17
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Leaving open for @nzakas and @snitin315 to verify the latest changes.

@mdjermanovic mdjermanovic moved this from Merge Candidates to Second Review Needed in Triage Jun 3, 2025
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM pending @snitin315's review.

@snitin315 snitin315 merged commit 342bd29 into eslint:main Jun 3, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Second Review Needed to Complete in Triage Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion contributor pool feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Rule Change: ignore type annotations in no-restricted-globals
6 participants