mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-18 12:05:32 +00:00
16 lines
300 B
JavaScript
16 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);
|
|
}
|