Sha256: 7a5e4e6635ed15437ea8d4e03b9e22dcfb1debe7d68901d34775dcb7064d6634

Contents?: true

Size: 468 Bytes

Versions: 2

Compression:

Stored size: 468 Bytes

Contents

import message from '@commitlint/message';
export const bodyFullStop = (parsed, when = 'always', value = '.') => {
    const input = parsed.body;
    if (!input) {
        return [true];
    }
    const negated = when === 'never';
    const hasStop = input[input.length - 1] === value;
    return [
        negated ? !hasStop : hasStop,
        message(['body', negated ? 'may not' : 'must', 'end with full stop']),
    ];
};
//# sourceMappingURL=body-full-stop.js.map

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pcp-server-ruby-sdk-0.0.6 node_modules/@commitlint/rules/lib/body-full-stop.js
pcp-server-ruby-sdk-0.1.0 node_modules/@commitlint/rules/lib/body-full-stop.js