configurationError.js 371 B

12345678910111213141516
  1. 'use strict';
  2. /** @typedef {import('stylelint').ConfigurationError} ConfigurationError */
  3. /**
  4. * Create configurationError from text and set CLI exit code
  5. * @param {string} text
  6. * @returns {ConfigurationError}
  7. */
  8. module.exports = function configurationError(text) {
  9. const err = /** @type {ConfigurationError} */ (new Error(text));
  10. err.code = 78;
  11. return err;
  12. };