add prettier

This commit is contained in:
MorganGeek 2020-07-11 12:22:28 +02:00
parent c69bad4acf
commit e48c7e700a
4 changed files with 101 additions and 108 deletions

3
.gitignore vendored
View File

@ -18,6 +18,9 @@ private_dot_config/gh/state.yml
# no secrets # no secrets
private_dot_config/gh/hosts.yml private_dot_config/gh/hosts.yml
# no symbolic links
.pre-commit-config.yaml
# newsboat (rss reader) # newsboat (rss reader)
*newsboat/cache.db *newsboat/cache.db
*newsboat/history.cmdline *newsboat/history.cmdline

View File

@ -1,61 +0,0 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: pretty-format-json
- id: check-symlinks
- id: detect-aws-credentials
- id: detect-private-key
- id: flake8
- id: requirements-txt-fixer
- id: sort-simple-yaml
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.27.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
hooks:
- id: terraform_fmt
- id: terraform_docs
- id: terragrunt_fmt
- id: terraform_tflint
args: ['--deep']
- id: terraform_validate
- repo: https://github.com/jumanjihouse/pre-commit-hooks
sha: 1.11.2
hooks:
- id: shellcheck
- id: shfmt
- id: script-must-have-extension
- id: git-check
# - id: git-dirty
- id: forbid-binary
- id: bundler-audit
- repo: https://github.com/cesar-rodriguez/terrascan
rev: v0.2.0
hooks:
- id: terrascan
pass_filenames: false
args: [-l=infra] #NOTE: that this is the directory you created earlier to host your terraform
verbose: true
- repo: https://github.com/askulkarni2/pre-commit-docker-jenkinslint
rev: master
hooks:
- id: docker-jenkinslint
language: docker_image
entry: --entrypoint /usr/local/bin/run-jflint.sh askulkarni2/jenkinslint
files: Jenkinsfile
#- repo: https://github.com/ansible/ansible-lint.git
# rev: v4.1.0
# hooks:
# - id: ansible-lint
# files: \.(yaml|yml)$
#- repo: https://github.com/pre-commit/mirrors-autopep8
# rev: 'v1.5' # Use the sha / tag you want to point at
# hooks:
# - id: autopep8

View File

@ -198,3 +198,4 @@ brew "tokei"
brew "fd" brew "fd"
brew "git-delta" brew "git-delta"
brew "sn0int" brew "sn0int"
brew "prettier"

View File

@ -1,50 +1,100 @@
---
# See https://pre-commit.com for more information # See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0 rev: v3.1.0
hooks: hooks:
- id: trailing-whitespace - id: check-yaml
- id: end-of-file-fixer - id: check-added-large-files
- id: check-yaml - id: check-case-conflict
- id: check-added-large-files - id: check-executables-have-shebangs
- id: check-merge-conflict - id: check-json
- id: pretty-format-json - id: check-merge-conflict
- id: check-symlinks - id: check-symlinks
- id: detect-aws-credentials - id: check-yaml
- id: detect-private-key - id: check-xml
- id: flake8 - id: detect-aws-credentials
- id: requirements-txt-fixer - id: detect-private-key
- id: sort-simple-yaml - id: end-of-file-fixer
- repo: git://github.com/antonbabenko/pre-commit-terraform - id: flake8
rev: v1.27.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases - id: mixed-line-ending
hooks: - id: pretty-format-json
- id: terraform_fmt - id: requirements-txt-fixer
- id: terraform_docs - id: sort-simple-yaml
- id: terragrunt_fmt - id: trailing-whitespace
- id: terraform_tflint - repo: git://github.com/antonbabenko/pre-commit-terraform
args: ['--deep'] rev: v1.31.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
- id: terraform_validate hooks:
- repo: https://github.com/jumanjihouse/pre-commit-hooks - id: terraform_fmt
sha: 1.11.2 - id: terragrunt_fmt
hooks: - id: terraform_docs
- id: shellcheck - id: terraform_docs_without_aggregate_type_defaults
- id: shfmt - id: terraform_tflint
- id: script-must-have-extension args: [--deep]
- id: git-check - id: terraform_validate
- id: forbid-binary - id: terraform_tfsec
- id: bundler-audit #- repo: https://github.com/ansible/ansible-lint.git
- repo: https://github.com/cesar-rodriguez/terrascan # rev: v4.1.0
rev: v0.2.0 # hooks:
hooks: #- id: ansible-lint
- id: terrascan # files: \.(yaml|yml)$
pass_filenames: false - repo: git@github.com:jorisroovers/gitlint.git
args: [-l=infra] #NOTE: that this is the directory you created earlier to host your terraform rev: v0.13.1
verbose: true hooks:
- repo: https://github.com/askulkarni2/pre-commit-docker-jenkinslint - id: gitlint
rev: master - repo: https://github.com/jumanjihouse/pre-commit-hooks
hooks: rev: 1.11.2
- id: docker-jenkinslint hooks:
language: docker_image - id: shellcheck
entry: --entrypoint /usr/local/bin/run-jflint.sh askulkarni2/jenkinslint - id: shfmt
files: Jenkinsfile - id: script-must-have-extension
- id: git-check
- id: forbid-binary
- id: bundler-audit
- id: markdownlint
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.0.11
hooks:
- id: yamlfmt
- repo: https://github.com/cesar-rodriguez/terrascan
rev: v0.2.1
hooks:
- id: terrascan
pass_filenames: false
args: [-l=infra] #NOTE: that this is the directory you created earlier to host your terraform
verbose: true
- repo: https://github.com/askulkarni2/pre-commit-docker-jenkinslint
rev: 88dd7702e44bbc4dc742b37897e1ded7fe99dfba
hooks:
- id: docker-jenkinslint
language: docker_image
entry: --entrypoint /usr/local/bin/run-jflint.sh askulkarni2/jenkinslint
files: Jenkinsfile
- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
rev: v1.1.1
hooks:
- id: htmlhint
args: [--config, .htmlhintrc]
- id: htmllint
- id: markdown-toc
args: [--indent, ' ', -i]
- id: dockerfile_lint
args: [--json, --verbose, --dockerfile]
- repo: https://github.com/lovesegfault/beautysh
rev: 6.0.1
hooks:
- id: beautysh
- repo: https://github.com/mattlqx/pre-commit-search-and-replace
rev: v1.0.3
hooks:
- id: search-and-replace
- repo: https://github.com/codingjoe/relint
rev: 1.2.0
hooks:
- id: relint
- repo: git@github.com:Vimjas/vint.git
rev: v0.4a1
hooks:
- id: vint