commitizen / commitizen/cz-cli
[Config loader] check if config key is in package.json before accepting it as a config file
- Lenguaje dominante
- JavaScript
- Estrellas
- 17.5k
- Forks
- 566
- Merge medio
- 8 h 16 min
- PR fusionados (30 d)
- 1
Descripción
Hello,
I'm working on a monorepo with backend and frontend and a `.czrc` at the directory's root to enforce commit rules with commitizen.
All frontend-related files are in a subdirectory, including the `package.json` file at different filesystem levels.
**My issue**: In a subdirectory with a package.json between `pwd` and git repository root, `commitizen` seems to acknowledge this file as a configuration file despite the lack of `config.commitizen` key.
**Fix proposal**: There seems to be a mechanism to check the package.json has a commitizen configuration, but it is commented: https://github.com/commitizen/cz-cli/blob/2e57fd02a5fd2b2dcf89d3235a6956edaeaf672c/src/configLoader/loader.js#L30-L36
I tried to uncomment it in a local version of commitizen, and it works as expected.
Would it be possible to uncomment it or does it have unwanted side effects?
Guía de contribución
Línea de trabajo
Comienza en src/configLoader/loader.js, en las líneas 30-36, donde se encuentra la comprobación comentada de la configuración de package.json. Traza cómo se descubren los archivos de configuración desde un subdirectorio hacia la raíz del repositorio y verifica el comportamiento con y sin una clave config.commitizen. Se considera terminado cuando package.json solo se acepta si declara esa clave, sin romper otras fuentes de configuración.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, node.js
- Área
- cli, tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100