build: don't store eslint locally
This PR removes eslint
as a local dependency and switches to downloading it from npm
. It will still be updated regularly via @dependabot.
Why?
-
eslint
is the only linter stored locally (besidescpplint
, which has patches, unlike ESLint). - There are multiple issues related to file paths being too long and tarballs failing to lint properly (see: #39709 (closed), #34005 (closed), #32765 (closed), and others).
Why was eslint
set up like this initially?
When eslint
was first added to the repository in #1539 around 10 years, it replaced a (not as large, but still large) library, closure-lint
. Since then, the library has almost 4x its size. At the time, there was no discussion (AFAICT) about keeping or removing the directory—it was simply included as it was.
Size-wise, this'll save ~40MB, which isn't a huge much, but it's a decent amount.