@@ -3,8 +3,11 @@ import type { Linter, Rule, SourceCode as ESLintSourceCode } from 'eslint';
3
3
import type { AST, StyleContext, SvelteConfig } from 'svelte-eslint-parser';
4
4
import type { TSESTree } from '@typescript-eslint/types';
5
5
import 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';
6
8
import type { ASTNode, ASTNodeWithParent, ASTNodeListener } from './types-for-node.js';
7
9
import type * as TS from 'typescript';
10
+ import type { SourceLocation } from 'svelte-eslint-parser/lib/ast/common.js';
8
11
9
12
export type { ASTNode, ASTNodeWithParent, ASTNodeListener };
10
13
export interface RuleListener extends ASTNodeListener {
@@ -207,6 +210,10 @@ export interface SourceCode {
207
210
isSvelteScript?: boolean;
208
211
getSvelteHtmlAst?: () => unknown;
209
212
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 >;
210
217
svelteParseContext?: {
211
218
/**
212
219
* Whether to use Runes mode.
0 commit comments