From 90524da730f3682ec13da52ef8dc2b26a42e0fb0 Mon Sep 17 00:00:00 2001 From: Yotam Ofek Date: Sun, 22 Jun 2025 15:18:58 +0000 Subject: [PATCH] Document why tidy checks if `eslint` is installed via `npm` --- src/tools/tidy/src/rustdoc_js.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/tidy/src/rustdoc_js.rs b/src/tools/tidy/src/rustdoc_js.rs index 2517e2de12ce5..720f0712ee038 100644 --- a/src/tools/tidy/src/rustdoc_js.rs +++ b/src/tools/tidy/src/rustdoc_js.rs @@ -62,6 +62,9 @@ pub fn check(librustdoc_path: &Path, tools_path: &Path, src_path: &Path, bad: &m return; } }; + // Having the correct `eslint` version installed via `npm` isn't strictly necessary, since we're invoking it via `npx`, + // but this check allows the vast majority that is not working on the rustdoc frontend to avoid the penalty of running + // `eslint` in tidy. See also: https://github.com/rust-lang/rust/pull/142851 match get_eslint_version() { Some(version) => { if version != eslint_version {