2
0

.pre-commit-config.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. default_language_version:
  2. node: system
  3. python: python3
  4. repos:
  5. - repo: https://github.com/astral-sh/ruff-pre-commit
  6. rev: 'v0.1.5'
  7. hooks:
  8. - id: ruff
  9. args: [--fix, --exit-non-zero-on-fix]
  10. - id: ruff-format
  11. - repo: https://github.com/pre-commit/mirrors-prettier
  12. rev: v3.0.3
  13. hooks:
  14. - id: prettier
  15. types_or: [css, scss, javascript, ts, tsx, json, yaml]
  16. additional_dependencies:
  17. # Keep in sync with package.json
  18. - prettier@3.0.1
  19. - repo: https://github.com/pre-commit/mirrors-eslint
  20. rev: v8.49.0
  21. hooks:
  22. - id: eslint
  23. types: [file]
  24. files: \.(js|ts|tsx)$
  25. args: [--report-unused-disable-directives]
  26. additional_dependencies:
  27. # Keep in sync with package.json
  28. - eslint@8.46
  29. - '@typescript-eslint/eslint-plugin@6.2.1'
  30. - '@typescript-eslint/parser@6.2.1'
  31. - '@wagtail/eslint-config-wagtail@0.4.0'
  32. - repo: https://github.com/thibaudcolas/pre-commit-stylelint
  33. rev: v15.10.3
  34. hooks:
  35. - id: stylelint
  36. files: \.scss$
  37. additional_dependencies:
  38. # Keep in sync with package.json
  39. - stylelint@14.2.0
  40. - '@wagtail/stylelint-config-wagtail@0.5.0'
  41. - repo: https://github.com/thibaudcolas/curlylint
  42. rev: v0.13.1
  43. hooks:
  44. - id: curlylint
  45. args: ['--parse-only']
  46. - repo: https://github.com/rtts/djhtml
  47. rev: 3.0.6
  48. hooks:
  49. - id: djhtml
  50. - repo: https://github.com/returntocorp/semgrep
  51. rev: v1.40.0
  52. hooks:
  53. - id: semgrep
  54. args: ['--config', '.semgrep.yml', '--error']