diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a55ef9b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,33 @@ +--- +files: ^(.*\.(py|json|md|sh|yaml|cfg|txt))$ +exclude: ^(\.[^/]*cache/.*|.*/_user.py)$ +repos: + - repo: https://github.com/executablebooks/mdformat + # Do this before other tools "fixing" the line endings + rev: 0.7.17 + hooks: + - id: mdformat + name: Format Markdown + entry: mdformat # Executable to run, with fixed options + language: python + types: [markdown] + args: [--wrap, '75', --number] + additional_dependencies: + - mdformat-toc + - mdformat-beautysh + # -mdformat-shfmt + # -mdformat-tables + - mdformat-config + - mdformat-black + - mdformat-web + - mdformat-gfm + - repo: https://github.com/codespell-project/codespell + rev: v2.2.5 + hooks: + - id: codespell + args: + # - --builtin=clear,rare,informal,usage,code,names,en-GB_to_en-US + - --builtin=clear,rare,informal,usage,code,names + - --ignore-words-list=aci,master,jupyter,lite,ws,wan,hass,cmak,aks,tim,offen + - --skip="./.*" + - --quiet-level=2