Permalink
Cannot retrieve contributors at this time
18 lines (15 sloc)
593 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-env node */ | |
| const { types, scopes, allowCustomScopes } = require('./commitizen.config') | |
| const validTypes = types.map((type) => type.value) | |
| const validScopes = scopes.map((scope) => scope.name) | |
| const scopeValidationLevel = allowCustomScopes ? 1 : 2 | |
| module.exports = { | |
| extends: ['@commitlint/config-conventional'], | |
| parserPreset: './parser-preset', | |
| // Add your own rules. See http://marionebl.github.io/commitlint | |
| rules: { | |
| // Apply valid scopes and types | |
| 'scope-enum': [scopeValidationLevel, 'always', validScopes], | |
| 'type-enum': [2, 'always', validTypes], | |
| }, | |
| } |