42Atomys/webhooked

View on GitHub
githooks/commitlint.config.js

Summary

Maintainability
A
0 mins
Test Coverage
const Configuration = {
  /*
   * Resolve and load @commitlint/config-conventional from node_modules.
   * Referenced packages must be installed
   */
  extends: ['@commitlint/config-conventional'],
  /*
   * Resolve and load conventional-changelog-atom from node_modules.
   * Referenced packages must be installed
   */
  // parserPreset: 'conventional-changelog-atom',
  /*
   * Resolve and load @commitlint/format from node_modules.
   * Referenced package must be installed
   */
  formatter: '@commitlint/format',
  /*
   * Any rules defined here will override rules from @commitlint/config-conventional
   */
  rules: {
    'type-case': [2, 'always', 'lower-case'],
    'type-enum': [2, 'always', [
      'build',
      'chore',
      'ci',
      'docs',
      'feat',
      'fix',
      'perf',
      'revert',
      'style',
      'test'
    ]],
    'scope-case': [2, 'always', 'lower-case'],
    'scope-enum': [2, 'always', [
      'handler',
      'security',
      'formatting',
      'storage',
      'configuration',
      'deps',
      'go',
      'github',
      'git'
    ]],
    'scope-empty': [1, 'never'],

    'subject-case': [2, 'always', 'lower-case'],
    'header-max-length': [2, 'always', 142],
  },
  /*
   * Functions that return true if commitlint should ignore the given message.
   */
  ignores: [(commit) => commit === ''],
  /*
   * Whether commitlint uses the default ignore rules.
   */
  defaultIgnores: true,
  /*
   * Custom URL to show upon failure
   */
  helpUrl:
    'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
  /*
   * Custom prompt configs
   */
  prompt: {
    messages: {},
    questions: {
      type: {
        description: 'please input type:',
      },
    },
  },
};

module.exports = Configuration;