JSPM

  • Created
  • Published
  • Downloads 179884
  • Score
    100M100P100Q182364F
  • License MIT

Shareable commitlint config enforcing the angular commit convention types

Package Exports

  • @commitlint/config-angular-type-enum
  • @commitlint/config-angular-type-enum/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@commitlint/config-angular-type-enum) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@commitlint/config-angular-type-enum

Shareable commitlint config enforcing the angular commit convention types. Use with @commitlint/cli and @commitlint/prompt-cli.

See @commitlint/config-angular for full angular conventions.

Getting started

npm install --save-dev @commitlint/config-angular-types @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-angular-type-enum']};" > commitlint.config.js

Usage

echo "foo: bar" | commitlint # fails
echo "build: bar" | commitlint # passes

Examples

// commitlint.config.js
const types = require('@commitlint/config-angular-type-enum');

// Use as rule creating errors for non-allowed types
module.exports = {
  rules: {
    ...types.rules,
  },
};

// Warn for non-allowed types
module.exports = {
  rules: {
    'type-enum': [1, 'always', types.values()],
  },
};