From a7aaef1e85cf04acb2d88e88cbc4f9f6c3c9854d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 21 Mar 2025 12:08:11 +0100 Subject: [PATCH] Add information on eslint and how to install and run it --- CONTRIBUTING.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60e17ea1..a6d4afe1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -150,7 +150,8 @@ If you want to only run some tests, you can filter them by passing (part of) the cargo test --test gui -- search ``` -The first time, it'll fail and ask you to install the `browser-ui-test` package. Install it then re-run the tests. +The first time, it'll fail and ask you to install the `browser-ui-test` package. Install it with the provided +command then re-run the tests. If you want to disable the headless mode, use the `--disable-headless-test` option: @@ -162,6 +163,21 @@ The GUI tests are in the directory `tests/gui` in text files with the `.goml` ex using a `node.js` framework called `browser-ui-test`. You can find documentation for this language on its [repository](https://github.com/GuillaumeGomez/browser-UI-test/blob/master/goml-script.md). +### Checking changes in `.js` files + +The `.js` files source code is checked using [`eslint`](https://eslint.org/). This is a linter (just like `clippy` in Rust) +for the Javascript language. You can install it with `npm` by running the following command: + +``` +npm install +``` + +Then you can run it using: + +``` +npm run lint +``` + ## Updating highlight.js The following are instructions for updating [highlight.js](https://highlightjs.org/).