1
0
réplica de https://github.com/arsenetar/dupeguru.git synced 2025-07-05 15:03:20 +00:00

feat: Add pre-commit and commitlint

Este commit está contenido en:
Andrew Senetar 2023-01-09 21:53:22 -06:00
padre 091cae0cc6
commit 2dd2a801cc
Firmado por: arsenetar
ID de clave GPG: C63300DCE48AB2F1
Se han modificado 2 ficheros con 39 adiciones y 0 borrados

22
.pre-commit-config.yaml Archivo normal
Ver fichero

@ -0,0 +1,22 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.3.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]

17
commitlint.config.js Archivo normal
Ver fichero

@ -0,0 +1,17 @@
const Configuration = {
/*
* Resolve and load @commitlint/config-conventional from node_modules.
* Referenced packages must be installed
*/
extends: ['@commitlint/config-conventional'],
/*
* Any rules defined here will override rules from @commitlint/config-conventional
*/
rules: {
'header-max-length': [2, 'always', 72],
'subject-case': [2, 'always', 'sentence-case'],
'scope-enum': [2, 'always'],
},
};
module.exports = Configuration;