first commit
This commit is contained in:
17
node_modules/stylelint/lib/utils/configurationError.mjs
generated
vendored
Normal file
17
node_modules/stylelint/lib/utils/configurationError.mjs
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user