.pre-commit-config.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. default_language_version:
  2. node: system
  3. python: python3
  4. repos:
  5. - repo: https://github.com/psf/black
  6. rev: 22.3.0
  7. hooks:
  8. - id: black
  9. language_version: python3
  10. args: ['--target-version', 'py37']
  11. - repo: https://github.com/timothycrosley/isort
  12. # isort config is in setup.cfg
  13. rev: 5.6.4
  14. hooks:
  15. - id: isort
  16. - repo: https://github.com/pycqa/flake8
  17. # flake8 config is in setup.cfg
  18. rev: 3.8.4
  19. hooks:
  20. - id: flake8
  21. additional_dependencies:
  22. - flake8-comprehensions
  23. - flake8-assertive
  24. - repo: https://github.com/pre-commit/mirrors-prettier
  25. rev: v2.5.1
  26. hooks:
  27. - id: prettier
  28. types_or: [css, scss, javascript, ts, tsx, json, yaml]
  29. - repo: https://github.com/pre-commit/mirrors-eslint
  30. rev: v8.8.0
  31. hooks:
  32. - id: eslint
  33. types: [file]
  34. files: \.(js|ts|tsx)$
  35. args: [--report-unused-disable-directives]
  36. additional_dependencies:
  37. - eslint@8.8.0
  38. - '@typescript-eslint/eslint-plugin@5.10.1'
  39. - '@typescript-eslint/parser@5.10.1'
  40. - '@wagtail/eslint-config-wagtail@0.4.0'
  41. - repo: https://github.com/thibaudcolas/pre-commit-stylelint
  42. rev: v14.2.0
  43. hooks:
  44. - id: stylelint
  45. files: \.scss$
  46. additional_dependencies:
  47. - stylelint@14.2.0
  48. - '@wagtail/stylelint-config-wagtail@0.3.2'
  49. - repo: https://github.com/thibaudcolas/curlylint
  50. rev: v0.13.1
  51. hooks:
  52. - id: curlylint
  53. args: ['--parse-only']
  54. - repo: https://github.com/rtts/djhtml
  55. rev: v1.5.2
  56. hooks:
  57. - id: djhtml
  58. - repo: https://github.com/returntocorp/semgrep
  59. rev: v1.3.0
  60. hooks:
  61. - id: semgrep
  62. args: ['--config', '.semgrep.yml', '--error']