chore(config): frente D — ESLint boundaries + Husky + commitlint + gitleaks

Higiene de PR antes da primeira feature de domínio.

- Tags Nx canônicas (scope/type/domain) em todos os 5 projetos, incluindo e2e
- depConstraints ESLint: scope:api|web|shared + type:app|e2e|feature|util|data
- Husky 9 + lint-staged: eslint --max-warnings=0 + prettier --check em pre-commit
- commitlint @conventional: tipo obrigatório, scope enum warn, body ilimitado
- gitleaks via Docker: zero leaks no tree completo; allowlist .agents/,.claude/,tmp/
- tmp/ adicionado ao .gitignore (relatórios de scan locais)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 19:52:05 +00:00
parent 29321f54c0
commit fdbf40cd1a
10 changed files with 664 additions and 4 deletions

16
commitlint.config.js Normal file
View File

@@ -0,0 +1,16 @@
// Commitlint — Conventional Commits canon JCS SAR.
// Tipos extras: docs, perf, ci, revert (além dos convencionais).
export default {
extends: ['@commitlint/config-conventional'],
rules: {
// Escopo opcional mas encorajado (api | web | shared | infra | docs)
'scope-enum': [
1, // warn, não error — novo escopo pode surgir legitimamente
'always',
['api', 'web', 'shared', 'infra', 'docs', 'e2e', 'config'],
],
// Corpo pode ter qualquer comprimento (mensagens longas são bem-vindas)
'body-max-line-length': [0, 'always', Infinity],
'footer-max-line-length': [0, 'always', Infinity],
},
};