about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-05-30 21:06:43 +0200
committerGitHub <noreply@github.com>2021-05-30 21:06:43 +0200
commit9c873c1240c0b4f7e7a26e9b01a4591cc2b6bb0f (patch)
tree596e62005a0029eaf9836ade1057a5253fc2ef15
parent59579907ab52ad2369735622185a26f158bf0f0f (diff)
parent558b073c4c8f73bac8061befef7cff01d038910a (diff)
downloadrust-9c873c1240c0b4f7e7a26e9b01a4591cc2b6bb0f.tar.gz
rust-9c873c1240c0b4f7e7a26e9b01a4591cc2b6bb0f.zip
Rollup merge of #85285 - GuillaumeGomez:eslint-check, r=jsha,Mark-Simulacrum
Add eslint checks to CI

It also allowed me to fix some potential issues that went unnoticed. Having this process automated will hopefully prevent us to add more errors. :)

cc `@Mark-Simulacrum` (for the add in the CI).
r? `@jsha`
-rw-r--r--src/ci/docker/host-x86_64/mingw-check/Dockerfile4
-rw-r--r--src/librustdoc/html/static/sidebar-items.js1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ci/docker/host-x86_64/mingw-check/Dockerfile b/src/ci/docker/host-x86_64/mingw-check/Dockerfile
index fd6dc563a0e..66afe84be4a 100644
--- a/src/ci/docker/host-x86_64/mingw-check/Dockerfile
+++ b/src/ci/docker/host-x86_64/mingw-check/Dockerfile
@@ -22,6 +22,7 @@ ENV PATH="/node-v14.4.0-linux-x64/bin:${PATH}"
 # Install es-check
 # Pin its version to prevent unrelated CI failures due to future es-check versions.
 RUN npm install es-check@5.2.3 -g
+RUN npm install eslint@7.20.0 -g
 
 COPY scripts/sccache.sh /scripts/
 RUN sh /scripts/sccache.sh
@@ -37,4 +38,5 @@ ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
            python3 ../x.py doc --stage 0 library/test && \
            /scripts/validate-toolstate.sh && \
            # Runs checks to ensure that there are no ES5 issues in our JS code.
-           es-check es5 ../src/librustdoc/html/static/*.js
+           es-check es5 ../src/librustdoc/html/static/*.js && \
+           eslint ../src/librustdoc/html/static/*.js
diff --git a/src/librustdoc/html/static/sidebar-items.js b/src/librustdoc/html/static/sidebar-items.js
index 81172ba0d92..256cd2740a0 100644
--- a/src/librustdoc/html/static/sidebar-items.js
+++ b/src/librustdoc/html/static/sidebar-items.js
@@ -1 +1,2 @@
+/* global initSidebarItems */
 initSidebarItems({});