diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..9067704 --- /dev/null +++ b/.flake8 @@ -0,0 +1,5 @@ +[flake8] +ignore = E203, E266, E501, W503, F403, F401, E402, E722, C901 +max-line-length = 79 +max-complexity = 18 +select = B,C,E,F,W,T4,B9 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a0220f3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,50 @@ +fail_fast: true +repos: +- repo: meta + hooks: + - id: check-useless-excludes +- repo: https://github.com/prettier/prettier + rev: 1.19.1 + hooks: + - id: prettier + files: \.(css|js|md|markdown|json) +- repo: https://github.com/python/black + rev: 19.10b0 + hooks: + - id: black +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.4.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-symlinks + - id: check-vcs-permalinks + - id: check-xml + - id: check-yaml + args: [--unsafe] + - id: end-of-file-fixer + - id: fix-encoding-pragma + - id: forbid-new-submodules + - id: no-commit-to-branch + args: [--branch, next] + - id: requirements-txt-fixer + - id: sort-simple-yaml + - id: trailing-whitespace +# - repo: https://github.com/pre-commit/pre-commit-hooks +# rev: v1.2.3 +# hooks: +# - id: flake8 +- repo: https://github.com/pecigonzalo/pre-commit-shfmt.git + rev: master + hooks: + - id: shell-fmt + args: + - --indent=4 +- repo: https://github.com/asottile/blacken-docs + rev: master + hooks: + - id: blacken-docs