rust-lang / docs.rs

crates.io documentation generator
https://docs.rs
MIT License
979 stars 195 forks source link

Add eslint check #2472

Closed GuillaumeGomez closed 6 months ago

GuillaumeGomez commented 6 months ago

We should add eslint check into our CI for our JS code.

Nemo157 commented 6 months ago

Is it used in rustdoc (or crates.io) somewhere already? We may as well have consistent rules across projects since the exact ruleset doesn't matter much.

Nemo157 commented 6 months ago

Found the rustdoc checking:

https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/mingw-check/Dockerfile#L62-L66

and the crates.io checking:

https://github.com/rust-lang/crates.io/blob/ce9b0775710efc887b2e97117da402b0c9bcfa86/.github/workflows/ci.yml#L168

both have quite custom configs

https://github.com/rust-lang/rust/blob/536606bc5df7e6045c6dbedc2f852ba3d38581f1/src/librustdoc/html/static/.eslintrc.js https://github.com/rust-lang/crates.io/blob/ce9b0775710efc887b2e97117da402b0c9bcfa86/.eslintrc.js

I'll try and add a simple CI job with hopefully a simpler config :pensive: