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

refactor: remove globals dependency #18115

Merged
merged 1 commit into from Feb 13, 2024
Merged

refactor: remove globals dependency #18115

merged 1 commit into from Feb 13, 2024

Conversation

mdjermanovic
Copy link
Member

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)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

Removes globals dependency.

Since we extracted eslintrc logic into a separate package, the globals dependency was used only in two rules to get the list of ECMAScript globals. As we are already maintaining this list in eslint, there's no need for the globals package as a direct production dependency.

What changes did you make? (Give an overview)

  • Added astUtils.ECMASCRIPT_GLOBALS. It gets the latest ES globals from conf/globals.
  • Updated no-constant-binary-expression and no-extend-native rules to use astUtils.ECMASCRIPT_GLOBALS instead of the globals package.
  • Removed globals from dependencies and added it to devDependencies as we still need it in tests and in eslint.config.js. Also updated to the latest v14.0.0.

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

@mdjermanovic mdjermanovic requested a review from a team as a code owner February 13, 2024 09:58
@eslint-github-bot eslint-github-bot bot added the chore This change is not user-facing label Feb 13, 2024
Copy link

netlify bot commented Feb 13, 2024

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 0bd0def
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/65cb3d2afb04270008f01b42

@mdjermanovic mdjermanovic added the accepted There is consensus among the team that this change meets the criteria for inclusion label Feb 13, 2024
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!

@snitin315 snitin315 merged commit 9aa4df3 into main Feb 13, 2024
17 checks passed
@snitin315 snitin315 deleted the remove-globals branch February 13, 2024 10:19
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 chore This change is not user-facing
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

2 participants