Skip to content

Commit

Permalink
Remove the globals dependency
Browse files Browse the repository at this point in the history
This dependency got introduced in PR mozilla#10293, almost six years ago now,
because `eslint-plugin-mozilla` didn't work without it but also didn't
require it as a dependency itself.

However, nowadays `eslint-plugin-mozilla` works just fine without it,
and other dependencies that need it correctly require it themselves.
This can be seen using `npm ls globals`:

```
$ npm ls globals
pdf.js
├─┬ @babel/[email protected]
│ └─┬ @babel/[email protected]
│   └── [email protected]
├─┬ @babel/[email protected]
│ └─┬ @babel/[email protected]
│   └── [email protected]
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ ├─┬ @eslint/[email protected]
│ │ └── [email protected]
│ └── [email protected]
└── [email protected]
```

Further proof that `eslint-plugin-mozilla` (no longer) uses `globals` is
from a source code search in
https://searchfox.org/mozilla-central/search?q=globals&path=&case=false&regexp=false.
The only results for `eslint-plugin-mozilla` refer to a file named
`globals.js`, but the `globals` NPM package is not actually imported
anywhere.

Given this we should be able to safely get rid of this explicit
dependency on our end now.
  • Loading branch information
timvandermeij committed Jul 29, 2024
1 parent 300e806 commit 7e3d56a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-sort-exports": "^0.9.1",
"eslint-plugin-unicorn": "^55.0.0",
"globals": "^15.8.0",
"gulp": "^5.0.0",
"gulp-cli": "^3.0.0",
"gulp-postcss": "^10.0.0",
Expand Down

0 comments on commit 7e3d56a

Please sign in to comment.