UNPKG

stylelint

Version:

A mighty CSS linter that helps you avoid errors and enforce conventions.

16 lines (13 loc) 300 B
/** * @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); }