summaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
blob: 133d536dd900340c5ea167d75cdbc2864714d7f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
default_language_version:
  python: python3
exclude: >
  (?x)^(
      deluge/ui/web/docs/template/.*|
  )$
repos:
  - repo: https://github.com/ambv/black
    rev: 20.8b1
    hooks:
      - id: black
        name: Fmt Black
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v2.2.1
    hooks:
      - id: prettier
        name: Fmt Prettier
        # Workaround to list modified files only.
        args: [--list-different]
  - repo: https://gitlab.com/pycqa/flake8
    # v3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638
    rev: 3.7.9
    hooks:
      - id: flake8
        name: Chk Flake8
        additional_dependencies:
          - flake8-isort==4.0.0
          - pep8-naming==0.11.1
        args: [--isort-show-traceback]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.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: trailing-whitespace
        name: Fix Trailing whitespace