From d1b9e52223785f8aaee728256e0ec66b8fcf03b1 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Fri, 17 Nov 2023 15:25:59 -0500 Subject: [PATCH] chore: add pre-commit files --- .pre-commit-config.yaml | 46 +++++++++++++++++++++++++++++++++++++++++ .prettierignore | 8 +++++++ .prettierrc | 4 ++++ 3 files changed, 58 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..11ed0a7 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,46 @@ +default_install_hook_types: [pre-commit, commit-msg] +default_stages: [pre-commit] +exclude: | + (?x)( + ^assets/| + ^docs/.*.html + ) +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v1.2.3 + hooks: + - id: check-added-large-files + - id: end-of-file-fixer + - id: trailing-whitespace + # spell check + - repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + # https://github.com/codespell-project/codespell/issues/1498 + # Python formatting + - repo: https://github.com/psf/black + rev: 23.7.0 + hooks: + - id: black + # R formatting + - repo: https://github.com/lorenzwalthert/precommit + rev: v0.1.2 + hooks: + - id: style-files + # general linting + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.7.1 + hooks: + - id: prettier + # enforce commit format + - repo: https://github.com/compilerla/conventional-pre-commit + rev: v2.3.0 + hooks: + - id: conventional-pre-commit + stages: [commit-msg] + args: [] + - repo: https://github.com/citation-file-format/cffconvert + rev: 054bda51dbe278b3e86f27c890e3f3ac877d616c + hooks: + - id: validate-cff diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f0a6037 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +# gitignore +.nextflow* +work/ +data/ +results/ +.DS_Store +*.code-workspace +assets/*.html diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..df71f4f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +overrides: + - files: "*.md" + options: + tabWidth: 2