How to use @commitlint/prompt - 3 common examples

To help you get started, we’ve selected a few @commitlint/prompt 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 ecomfe / okam / commitlint.config.js View on Github external
description: ' 变更的模块名'
    },
    subject: {
        description: ' 变更的摘要信息'
    },
    body: {
        description: ' 附加的变更说明',
        multline: true
    },
    footer: {
        description: '<footer> 提供进一步的重大调整说明等信息',
        multiline: true
    }
});

let changeTypes = settings.type.enumerables;
const COMMIT_TYPES = Object.keys(changeTypes).map(
    k =&gt; ({name: k, note: changeTypes[k].description})
);

function padding(value, len, isRight = true) {
    let curr = value.length;
    if (curr &lt; len) {
        let whitespaces = '';
        for (let i = 0, num = len - curr; i &lt; num; i++) {
            whitespaces += ' ';
        }
        isRight ? (value += whitespaces) : (value = whitespaces + value);
    }
    return value;
}
</footer>
github ecomfe / okam / commitlint.config.js View on Github external
rules: {
        'body-leading-blank': [1, 'always'],
        'footer-leading-blank': [1, 'always'],
        'header-max-length': [2, 'always', 120],
        'scope-enum': ctx => [2, 'always', getPackages(ctx)],
        'scope-case': [2, 'always', 'lower-case'],
        'subject-case': [
            2,
            'never',
            ['sentence-case', 'start-case', 'pascal-case', 'upper-case']
        ],
        'subject-empty': [2, 'never'],
        'subject-full-stop': [2, 'never', '.'],
        'type-case': [2, 'always', 'lower-case'],
        'type-empty': [2, 'never'],
        'type-enum': [2, 'always', Object.keys(settings.type.enumerables)]
    }
};

@commitlint/prompt

commitizen prompt using commitlint.config.js

MIT
Latest version published 3 days ago

Package Health Score

98 / 100
Full package analysis