.pre-commit-config.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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', 'py38']
  11. - repo: https://github.com/astral-sh/ruff-pre-commit
  12. rev: 'v0.0.272'
  13. hooks:
  14. - id: ruff
  15. args: [--fix, --exit-non-zero-on-fix]
  16. - repo: https://github.com/pre-commit/mirrors-prettier
  17. rev: v3.0.1
  18. hooks:
  19. - id: prettier
  20. types_or: [css, scss, javascript, ts, tsx, json, yaml]
  21. additional_dependencies:
  22. # Keep in sync with package.json
  23. - prettier@3.0.1
  24. - repo: https://github.com/pre-commit/mirrors-eslint
  25. rev: v8.8.0
  26. hooks:
  27. - id: eslint
  28. types: [file]
  29. files: \.(js|ts|tsx)$
  30. args: [--report-unused-disable-directives]
  31. additional_dependencies:
  32. # Keep in sync with package.json
  33. - eslint@8.46
  34. - '@typescript-eslint/eslint-plugin@6.2.1'
  35. - '@typescript-eslint/parser@6.2.1'
  36. - '@wagtail/eslint-config-wagtail@0.4.0'
  37. - repo: https://github.com/thibaudcolas/pre-commit-stylelint
  38. rev: v14.2.0
  39. hooks:
  40. - id: stylelint
  41. files: \.scss$
  42. additional_dependencies:
  43. # Keep in sync with package.json
  44. - stylelint@14.2.0
  45. - '@wagtail/stylelint-config-wagtail@0.5.0'
  46. - repo: https://github.com/thibaudcolas/curlylint
  47. rev: v0.13.1
  48. hooks:
  49. - id: curlylint
  50. args: ['--parse-only']
  51. - repo: https://github.com/rtts/djhtml
  52. rev: v1.5.2
  53. hooks:
  54. - id: djhtml
  55. - repo: https://github.com/returntocorp/semgrep
  56. rev: v1.3.0
  57. hooks:
  58. - id: semgrep
  59. args: ['--config', '.semgrep.yml', '--error']