stylelint
Version:
A mighty CSS linter that helps you avoid errors and enforce conventions.
24 lines (17 loc) • 604 B
JavaScript
// NOTICE: This file is generated by Rollup. To modify it,
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
;
const constants = require('../constants.cjs');
/** @typedef {Error & { code: number }} ConfigurationError */
/**
* Create configurationError from text and set CLI exit code.
*
* @param {string} text
* @returns {ConfigurationError}
*/
function configurationError(text) {
const err = /** @type {ConfigurationError} */ (new Error(text));
err.code = constants.EXIT_CODE_INVALID_CONFIG;
return err;
}
module.exports = configurationError;