diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-05-27 00:50:52 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-06-09 18:50:11 -0400 |
| commit | 12434d455067fe2c24d6073113f2c34f46f1a0c7 (patch) | |
| tree | a7c79038df8e83f29be48cf7b2f21e2dda0e0090 /docs | |
| parent | 71919b461f25bed1bb4708b0494d603de373ae11 (diff) | |
Consolidate project linting into tool scripts.
The new `tools/check-lint` script checks lints across _all_ lintable files - JS (through `eslint`), and Rust (through `clippy` and `cargo check`). It also checks `eslint` against the whole project, not just against what's in the `ui` subdir, which means it now catches lintable issues in various JS config files.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/linting.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/linting.md b/docs/linting.md new file mode 100644 index 0000000..6620a74 --- /dev/null +++ b/docs/linting.md @@ -0,0 +1,23 @@ +# Linting + +We use automated tools, rather than human effort, to spot possible bugs or dubious structural choices, where possible. This is handled by three tools: + +- Javascript is linted using [eslint]. +- Rust is linted using [cargo check] and [clippy]. + +[eslint]: https://eslint.org/ + +[cargo check]: https://doc.rust-lang.org/cargo/commands/cargo-check.html + +[clippy]: https://doc.rust-lang.org/cargo/commands/cargo-clippy.html + +## Tools + +- To check for detectable lints, run + `tools/check-lint`. This should be run whenever making changes, and is part of the optional + `git-hooks/pre-commit` hook script. + +- To fix lints that have automatic fixes, run + `tools/delint`. + +You can also run the individual lint tools directly. The tool scripts listed above contain the specific commands needed. |
