stylelint
Version:
A mighty CSS linter that helps you avoid errors and enforce conventions.
18 lines (13 loc) • 427 B
JavaScript
import { EXIT_CODE_INVALID_CONFIG } from '../constants.mjs';
/** @typedef {Error & { code: number }} ConfigurationError */
/**
* Create configurationError from text and set CLI exit code.
*
* @param {string} text
* @returns {ConfigurationError}
*/
export default function configurationError(text) {
const err = /** @type {ConfigurationError} */ (new Error(text));
err.code = EXIT_CODE_INVALID_CONFIG;
return err;
}