Skip to content

Instantly share code, notes, and snippets.

@1davidmichael
Created August 20, 2021 13:45
Show Gist options
  • Save 1davidmichael/c0fe7b58c00c5aad40d9b3e64ed2c6c0 to your computer and use it in GitHub Desktop.
Save 1davidmichael/c0fe7b58c00c5aad40d9b3e64ed2c6c0 to your computer and use it in GitHub Desktop.
Pre-commit vscode snippets

Pre-commit vscode snippets

Add these snippets to vscode yaml snippets to quickly add preconfigured snippets for .pre-commit-config.yaml pre-commit config.

{
"CloudFormation Precommit": {
"body": [
" - repo: https://github.com/aws-cloudformation/cfn-python-lint",
" rev: v0.48.2",
" hooks:",
" - id: cfn-python-lint",
" files: template.yaml",
" - repo: https://github.com/adrienverge/yamllint.git",
" rev: v1.26.0",
" hooks:",
" - id: yamllint",
" args: [\"-d relaxed\"]"
],
"description": "CloudFormation Pre-commit Configuration"
},
"Standard Precommit": {
"body": [
"repos:",
" - repo: https://github.com/pre-commit/pre-commit-hooks",
" rev: v3.4.0",
" hooks:",
" - id: end-of-file-fixer",
" - id: trailing-whitespace",
" - id: check-added-large-files"
],
"description": "Generic Pre-commit Configuration"
},
"Python Precommit": {
"body": [
" - repo: https://github.com/pycqa/flake8",
" rev: '3.9.2'",
" hooks:",
" - id: flake8",
" - repo: https://github.com/psf/black",
" rev: stable",
" hooks:",
" - id: black",
" language_version: python3.8",
" - repo: https://github.com/pycqa/isort",
" rev: 5.8.0",
" hooks:",
" - id: isort",
" name: isort (python)",
" - id: isort",
" name: isort (cython)",
" types: [cython]",
" - id: isort",
" name: isort (pyi)",
" types: [pyi]"
],
"description": "CloudFormation Pre-commit Configuration"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment