All files / lib/definitions errors.js

100% Statements 7/7
100% Branches 0/0
100% Functions 3/3
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19    1x 1x   1x 2x     1x       1x          
import {createRequire} from "node:module";
 
const require = createRequire(import.meta.url);
const pkg = require("../../package.json");
 
const [homepage] = pkg.homepage.split("#");
const linkify = (file) => `${homepage}/blob/master/${file}`;
 
export default {
    EINVALIDCOMMITLINTCONFIG: ({commitlintConfig}) => ({
        message: "Invalid `commitlintConfig` option.",
        details: `The [commitlintConfig option](${linkify("README.md#configuration-by-commitlintconfig-option")}) option, if defined, must be a non empty \`Object\`. Your configuration for the \`commitlintConfig\` option is \`${JSON.stringify(commitlintConfig)}\`.`,
    }),
    EINVALIDCOMMITLINTFILE: ({commitlintFile}) => ({
        message: "Invalid `commitlintFile` option.",
        details: `The [commitlintFile option](${linkify("README.md#configuration-by-commitlintfile-option-commitlintfile")}) option, if defined, must be a non empty \`String\`. Your configuration for the \`commitlintFile\` option is \`${commitlintFile}\`.`,
    }),
};