diff options
| author | Yotam Ofek <yotamofek@microsoft.com> | 2025-06-22 15:18:58 +0000 |
|---|---|---|
| committer | Yotam Ofek <yotamofek@microsoft.com> | 2025-06-22 15:18:58 +0000 |
| commit | 90524da730f3682ec13da52ef8dc2b26a42e0fb0 (patch) | |
| tree | 9a7d27471b0f51cc07940573b3782a0447ad94c5 /src/tools/tidy | |
| parent | a30f1783fe136d92545423dd30b12eb619973cdb (diff) | |
| download | rust-90524da730f3682ec13da52ef8dc2b26a42e0fb0.tar.gz rust-90524da730f3682ec13da52ef8dc2b26a42e0fb0.zip | |
Document why tidy checks if `eslint` is installed via `npm`
Diffstat (limited to 'src/tools/tidy')
| -rw-r--r-- | src/tools/tidy/src/rustdoc_js.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/tidy/src/rustdoc_js.rs b/src/tools/tidy/src/rustdoc_js.rs index 2517e2de12c..720f0712ee0 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 { |
