Skip to content

Remove the eslint-plugin-mozilla dependency#18583

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
timvandermeij:eslint-plugin-mozilla
Aug 8, 2024
Merged

Remove the eslint-plugin-mozilla dependency#18583
timvandermeij merged 1 commit into
mozilla:masterfrom
timvandermeij:eslint-plugin-mozilla

Conversation

@timvandermeij

@timvandermeij timvandermeij commented Aug 8, 2024

Copy link
Copy Markdown
Collaborator

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

@Snuffleupagus Snuffleupagus left a comment

Copy link
Copy Markdown
Collaborator

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!

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