@@ -3,8 +3,11 @@ import type { Linter, Rule, SourceCode as ESLintSourceCode } from 'eslint';
33import type { AST, StyleContext, SvelteConfig } from 'svelte-eslint-parser';
44import type { TSESTree } from '@typescript-eslint/types';
55import type { ScopeManager, Scope, Variable } from '@typescript-eslint/scope-manager';
6+ import type { Rule as StyleRule, Node } from 'postcss';
7+ import type { Root as SelectorRoot, Node as SelectorNode } from 'postcss-selector-parser';
68import type { ASTNode, ASTNodeWithParent, ASTNodeListener } from './types-for-node.js';
79import type * as TS from 'typescript';
10+ import type { SourceLocation } from 'svelte-eslint-parser/lib/ast/common.js';
811
912export type { ASTNode, ASTNodeWithParent, ASTNodeListener };
1013export interface RuleListener extends ASTNodeListener {
@@ -207,6 +210,10 @@ export interface SourceCode {
207210 isSvelteScript?: boolean;
208211 getSvelteHtmlAst?: () => unknown;
209212 getStyleContext?: () => StyleContext;
213+ getStyleSelectorAST: (rule: StyleRule) => SelectorRoot;
214+ styleNodeLoc: (node: Node) => Partial<SourceLocation >;
215+ styleNodeRange: (node: Node) => [number | undefined, number | undefined];
216+ styleSelectorNodeLoc: (node: SelectorNode) => Partial<SourceLocation >;
210217 svelteParseContext?: {
211218 /**
212219 * Whether to use Runes mode.
0 commit comments