From 988c74ec5665250c572dcc6bae018ed0ea180c25 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Fri, 13 Aug 2021 12:11:18 +0200 Subject: feat: Add pre-commit hook for linting and formatting (#1132) * feat: Add pre-commit hook for linting and formatting * format with prettier --- CONTRIBUTING.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'CONTRIBUTING.md') diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7606fe46..45edf8c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,9 +17,19 @@ One of the best ways to begin contributing in a meaningful way is by helping fin ## Setting up development tools -1. Install [stylua](https://github.com/johnnymorganz/stylua#installation) +### For editing Lua files -2. Install [shfmt](https://github.com/mvdan/sh#shfmt) +1. Formatter: [stylua](https://github.com/johnnymorganz/stylua#installation). +2. Linter: [luacheck](https://github.com/luarocks/luacheck). + +### For editing shell scripts + +1. Formatter: [shfmt](https://github.com/mvdan/sh#shfmt). +2. Linter: [shellcheck](https://github.com/koalaman/shellcheck). + +### (Optional) + +Install [pre-commit](https://github.com/pre-commit/pre-commit) which will run all linters and formatters for you as a pre-commit-hook. ## Some Guidelines -- cgit v1.2.3