/** * CSS Source Code Object. * @extends {TextSourceCodeBase<{LangOptions: CSSLanguageOptions, RootNode: StyleSheetPlain, SyntaxElementWithLoc: CSSSyntaxElement, ConfigNode: Comment}>} */ export class CSSSourceCode extends TextSourceCodeBase<{ LangOptions: CSSLanguageOptions; RootNode: StyleSheetPlain; SyntaxElementWithLoc: CSSSyntaxElement; ConfigNode: Comment; }> { /** * Creates a new instance. * @param {Object} options The options for the instance. * @param {string} options.text The source code text. * @param {StyleSheetPlain} options.ast The root AST node. * @param {Array} options.comments The comment nodes in the source code. * @param {Lexer} options.lexer The lexer used to parse the source code. */ constructor({ text, ast, comments, lexer }: { text: string; ast: StyleSheetPlain; comments: Array; lexer: Lexer; }); /** * The comment node in the source code. * @type {Array|undefined} */ comments: Array | undefined; /** * The lexer for this instance. * @type {Lexer} */ lexer: Lexer; /** * Returns an array of all inline configuration nodes found in the * source code. * @returns {Array} An array of all inline configuration nodes. */ getInlineConfigNodes(): Array; /** * Returns directives that enable or disable rules along with any problems * encountered while parsing the directives. * @returns {{problems:Array,directives:Array}} Information * that ESLint needs to further process the directives. */ getDisableDirectives(): { problems: Array; directives: Array; }; /** * Returns inline rule configurations along with any problems * encountered while parsing the configurations. * @returns {{problems:Array,configs:Array<{config:{rules:RulesConfig},loc:CssLocationRange}>}} Information * that ESLint needs to further process the rule configurations. */ applyInlineConfig(): { problems: Array; configs: Array<{ config: { rules: RulesConfig; }; loc: CssLocationRange; }>; }; /** * Traverse the source code and return the steps that were taken. * @returns {Iterable} The steps that were taken while traversing the source code. */ traverse(): Iterable; #private; } import type { CSSLanguageOptions } from "./css-language.js"; import type { StyleSheetPlain } from "@eslint/css-tree"; import type { CSSSyntaxElement } from "../types.js"; import type { Comment } from "@eslint/css-tree"; import { TextSourceCodeBase } from "@eslint/plugin-kit"; import type { Lexer } from "@eslint/css-tree"; import type { FileProblem } from "@eslint/core"; import { Directive } from "@eslint/plugin-kit"; import type { RulesConfig } from "@eslint/core"; import type { CssLocationRange } from "@eslint/css-tree"; /** * A class to represent a step in the traversal process. */ declare class CSSTraversalStep extends VisitNodeStep { /** * Creates a new instance. * @param {Object} options The options for the step. * @param {CssNode} options.target The target of the step. * @param {1|2} options.phase The phase of the step. * @param {Array} options.args The arguments of the step. */ constructor({ target, phase, args }: { target: CssNode; phase: 1 | 2; args: Array; }); /** * The target of the step. * @type {CssNode} */ target: CssNode; } import { VisitNodeStep } from "@eslint/plugin-kit"; import type { CssNode } from "@eslint/css-tree"; export {};