Adding pre-commit hooks

This commit is contained in:
Benjamin Bach 2018-06-23 20:54:24 +02:00
parent 1add5f3e35
commit 36a4c901a8

28
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,28 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v1.3.0
hooks:
- id: trailing-whitespace
- id: flake8
- id: check-yaml
- id: check-added-large-files
- id: debug-statements
- id: end-of-file-fixer
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.0.1
hooks:
- id: reorder-python-imports
- repo: local
hooks:
- id: frontend-prettify
name: Prettier Linting of JS and Vue files
description: This hook rewrites JS and the JS portion of Vue files to conform to prettier standards.
entry: yarn run lint-js -- -w
language: system
files: \.(js|vue)$
- id: frontend-eslint
name: ESLinting of JS and Vue files
description: This hook rewrites JS and the JS portion of Vue files to conform to our ESLint standards.
entry: node node_modules/eslint/bin/eslint.js
language: system
files: \.(js|vue)$