How to use the @commitlint/config-lerna-scopes.utils function in @commitlint/config-lerna-scopes

To help you get started, we’ve selected a few @commitlint/config-lerna-scopes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brandingbrand / flagship / commitlint.config.js View on Github external
const { getPackages } = require('@commitlint/config-lerna-scopes').utils;

module.exports = {
  extends: [
    '@commitlint/config-lerna-scopes',
    '@commitlint/config-conventional'
  ],
  rules: {
    'subject-case': [0],
    // greenkeeper-lockfile doesn't support customization of commit messages and always uses the
    // commit message "chore(package)..."
    'scope-enum': ctx => getPackages(ctx).then(packages => [2, 'always', [
      ...packages,
      'package',
      'release'
    ]])
  }
github clebert / pageobject / commitlint.config.js View on Github external
const {getPackages} = require('@commitlint/config-lerna-scopes').utils;

module.exports = {
  extends: ['@commitlint/config-angular'],
  rules: {
    'header-max-length': [2, 'always', 140],
    'scope-enum': () => [2, 'always', [...getPackages(), 'all']],
    'subject-case': [2, 'always', ['lower-case', 'kebab-case']]
  }
};

@commitlint/config-lerna-scopes

Shareable commitlint config enforcing lerna package and workspace names as scopes

MIT
Latest version published 2 months ago

Package Health Score

95 / 100
Full package analysis