Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* 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,
};