From c7c21b7ac9c8ef5bb89dc154a2118f955ec5572c Mon Sep 17 00:00:00 2001 From: Matt Schwager Date: Tue, 16 Jan 2024 09:58:47 -0700 Subject: [PATCH] Fix #43, add linting process to CONTRIBUTING --- CONTRIBUTING.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7243d8a..4b82430 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,19 @@ Then [install semgrep CLI](https://semgrep.dev/docs/getting-started/), and you a ### Linting -Currenty we don't use any linting tools. In the future we plan to use `yamlfmt`. +First, [install `prettier`](https://prettier.io/docs/en/install), or [use `brew`](https://formulae.brew.sh/formula/prettier) to do so. + +Use the following command to check rule files for formatting errors: + +```bash +prettier --check '**/*.{yaml,yml}' +``` + +Any issues can be automatically fixed with the following command: + +```bash +prettier --write '**/*.{yaml,yml}' +``` ### Testing