How to use @commitlint/config-lerna-scopes - 7 common examples

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 Synerise / synerise-design / commitlint.config.js View on Github external
'scope-enum': ctx =>
      scopes.rules['scope-enum'](ctx).then(([level, applicable, packages]) => [
        level,
        applicable,
        packages.map(pkg => (pkg.includes(prefix) ? pkg.replace(prefix, '') : pkg)).concat(['scripts']),
      ]),
  },
github telus / tds-core / commitlint.config.js View on Github external
const applyCustomScope = () => {
  return Promise.resolve(
    packages.rules[`scope-enum`]().then(scopes => {
      const config = scopes
      config[2].push(
        'config',
        'deps',
        'docs',
        'e2e',
        'github',
        'guide',
        'openshift',
        'other',
        'scripts',
        'shared',
        'packages',
        'publish',
        'vscode'
      )
github telus / tds-community / commitlint.config.js View on Github external
const applyCustomScope = () => {
  return Promise.resolve(
    packages.rules[`scope-enum`]().then(scopes => {
      const config = scopes
      config[2].push(
        'config',
        'deps',
        'docs',
        'e2e',
        'github',
        'guide',
        'openshift',
        'other',
        'scripts',
        'shared',
        'packages',
        'publish',
        'samples',
        'vscode'
github pluralsight / design-system / commitlint.config.js View on Github external
'scope-enum': ctx =>
      scopes.rules['scope-enum'](ctx).then(([level, applicable, packages]) => [
        level,
        applicable,
        packages
          .map(pkg => (pkg.includes(prefix) ? pkg.replace(prefix, '') : pkg))
          .concat(['examples', 'scripts'])
      ])
  }
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']]
  }
};
github brandingbrand / flagship / commitlint.config.js View on Github external
    'scope-enum': ctx => getPackages(ctx).then(packages => [2, 'always', [
      ...packages,
      'package',
      'release'
    ]])
  }

@commitlint/config-lerna-scopes

Shareable commitlint config enforcing lerna package and workspace names as scopes

MIT
Latest version published 3 months ago

Package Health Score

92 / 100
Full package analysis