v-wordpress-plugin-updater/node_modules/stylelint/lib/utils/getLexer.mjs
2025-08-14 00:05:37 -04:00

15 lines
300 B
JavaScript

/**
* @typedef {import('css-tree').Lexer} Lexer
*/
/**
* @param {import('stylelint').RuleContext} context
* @returns {Lexer}
*/
export default function getLexer(context) {
if (!context?.lexer) {
throw new Error('Expected a "lexer" object');
}
return /** @type Lexer */ (context.lexer);
}