deluge/.pre-commit-config.yaml
Calum Lind a8a4fb69c0 [Lint] Exclude js and css from EOF fixer
- When running pre-commit on all files it is picking up minified js and
  css files. Since prettier will format correctly the source files ignore
  them in end-of-file fixer.
- The template files in web docs can be ignored too.
- Removed the unneeded `pre-commit-hooks` dependency as pre-commit
  resolves that itself.
- Include files fixed by pre-commit.
2018-10-05 18:45:37 +01:00

44 lines
1.0 KiB
YAML

exclude: >
(?x)^(
deluge/ui/web/docs/template/.*|
)$
repos:
- repo: https://github.com/ambv/black
rev: 18.9b0
hooks:
- id: black
name: Fmt Black
language_version: python3.6
- repo: https://github.com/prettier/prettier
rev: 1.14.3
hooks:
- id: prettier
name: Fmt Prettier
files: "\\.(
css\
|less\
|scss\
|html\
|ts|tsx\
|graphql|gql\
|json\
|js|jsx\
|md|markdown|mdown|mkdn\
|yaml|yml\
)$"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0
hooks:
- id: double-quote-string-fixer
name: Fix Double-quotes
- id: end-of-file-fixer
name: Fix End-of-files
exclude_types: [javascript, css]
- id: mixed-line-ending
name: Fix Line-endings
args: [--fix=auto]
- id: flake8
name: Chk Flake8
additional_dependencies:
- flake8-isort==2.5