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

Remove the eslint-plugin-mozilla dependency #18583

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Aug 8, 2024

We only used two rules from the plugin which can both easily be replaced nowadays:

  • mozilla/avoid-removeChild is equal to the already active unicorn/prefer-dom-node-remove rule; please see [1] and [2].
  • mozilla/import-globals is mostly obsolete nowadays ever since we removed the Firefox extension code from this repository and we eliminated most globals usage. The three remaining occurrences can be replaced with explicit /* globals */ comments that we already use elsewhere, which overall is also more consistent.

[1] https://firefox-source-docs.mozilla.org/code-quality/lint/linters/eslint-plugin-mozilla/rules/avoid-removeChild.html
[2] https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md

Fixes a part of #17928.

We only used two rules from the plugin which can both easily be replaced
nowadays:

- `mozilla/avoid-removeChild` is equal to the already active
  `unicorn/prefer-dom-node-remove` rule; please see [1] and [2].
- `mozilla/import-globals` is mostly obsolete nowadays ever since we
  removed the Firefox extension code from this repository and we
  eliminated most globals usage. The three remaining occurrences can be
  replaced with explicit `/* globals */` comments that we already use
  elsewhere, which overall is also more consistent.

[1] https://firefox-source-docs.mozilla.org/code-quality/lint/linters/eslint-plugin-mozilla/rules/avoid-removeChild.html
[2] https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

r=me, fewer dependencies are always nice; thank you!

@timvandermeij timvandermeij merged commit fb049b0 into mozilla:master Aug 8, 2024
6 checks passed
@timvandermeij timvandermeij deleted the eslint-plugin-mozilla branch August 8, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants