Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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'
]])
}
'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']),
]),
},
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'
)
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'
'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'])
])
}
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']]
}
};
'scope-enum': ctx => getPackages(ctx).then(packages => [2, 'always', [
...packages,
'package',
'release'
]])
}