How to use the @commitlint/load function in @commitlint/load

To help you get started, we’ve selected a few @commitlint/load 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 conventional-changelog / commitlint / @commitlint / prompt / src / input.js View on Github external
async function input(prompter) {
	const results = {
		type: null,
		scope: null,
		subject: null,
		body: null,
		footer: null
	};

	const {rules} = await load();

	await Promise.all(
		['type', 'scope', 'subject', 'body', 'footer'].map(
			throat(1, async input => {
				const inputRules = getRules(input, rules);
				const inputSettings = settings[input];

				const isHeader = ['type', 'scope', 'subject'].indexOf(input) > -1;

				const headerLengthRule = getRules('header', rules).filter(
					getHasName('max-length')
				)[0];

				if (isHeader && headerLengthRule) {
					const [, [severity, applicable, length]] = headerLengthRule;
					if (severity > 0 && applicable === 'always') {

@commitlint/load

Load shared commitlint configuration

MIT
Latest version published 2 months ago

Package Health Score

98 / 100
Full package analysis

Popular @commitlint/load functions