How to use the commitizen.configLoader.load function in commitizen

To help you get started, we’ve selected a few commitizen 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 pixeloven / pixeloven / packages / pixeloven / cz-simplified-changelog / src / index.ts View on Github external
/* tslint:disable no-any */
/**
 * https://github.com/commitizen/cz-conventional-changelog
 */
import engine from "./engine";
import { Options } from "./types";

import { configLoader } from "commitizen";

/**
 * @todo Remove and replace with our own version
 */
import conventionalCommitTypes from "conventional-commit-types";

const config = configLoader.load();
const defaultOptions: Options = {
    defaultBody: process.env.CZ_BODY || config.defaultBody,
    defaultSubject: process.env.CZ_SUBJECT || config.defaultSubject,
    defaultType: process.env.CZ_TYPE || config.defaultType,
    maxHeaderWidth:
        (process.env.CZ_MAX_HEADER_WIDTH &&
            parseInt(process.env.CZ_MAX_HEADER_WIDTH, 10)) ||
        config.maxHeaderWidth ||
        100,
    maxLineWidth:
        (process.env.CZ_MAX_LINE_WIDTH &&
            parseInt(process.env.CZ_MAX_LINE_WIDTH, 10)) ||
        config.maxLineWidth ||
        100,
    types: conventionalCommitTypes.types,
};

commitizen

Git commit, but play nice with conventions.

MIT
Latest version published 1 year ago

Package Health Score

74 / 100
Full package analysis