summaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2021-08-13 12:11:18 +0200
committerGitHub <[email protected]>2021-08-13 12:11:18 +0200
commit988c74ec5665250c572dcc6bae018ed0ea180c25 (patch)
tree747556740d360482fc0edfc7ce5ce996bbbca06a /.pre-commit-config.yaml
parent6bbce4ee07ac8428846dfb6722e15a932d6d9e05 (diff)
feat: Add pre-commit hook for linting and formatting (#1132)
* feat: Add pre-commit hook for linting and formatting * format with prettier
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r--.pre-commit-config.yaml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 00000000..3e3e7d34
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,30 @@
+repos:
+ - repo: local
+ hooks:
+ - id: shfmt
+ name: shfmt
+ minimum_pre_commit_version: 2.4.0
+ language: golang
+ additional_dependencies: [mvdan.cc/sh/v3/cmd/[email protected]]
+ entry: shfmt
+ args: [-i=2, -ci, -w]
+ types: [shell]
+ - id: shellcheck
+ name: shellcheck
+ language: system
+ types: [shell]
+ entry: bash
+ args:
+ [-c, "shfmt -f $(git rev-parse --show-toplevel) | xargs shellcheck"]
+ - id: stylua
+ name: StyLua
+ language: rust
+ entry: stylua
+ types: [lua]
+ args: [.]
+ - id: luacheck
+ name: luacheck
+ language: system
+ entry: luacheck
+ types: [lua]
+ args: [.]