@@ -11,7 +11,7 @@ import type { Context } from "../../context";
11
11
import { convertChildren , extractElementTags } from "./element" ;
12
12
import { convertAttributeTokens } from "./attr" ;
13
13
import type { Scope } from "eslint-scope" ;
14
- import type { ChildNode , Node , Parser , Root } from "postcss" ;
14
+ import type { Document , Node , Parser , Root } from "postcss" ;
15
15
import postcss from "postcss" ;
16
16
import { parse as SCSSparse } from "postcss-scss" ;
17
17
import type { ESLintCompatiblePostCSSNode } from "../../ast/style" ;
@@ -154,10 +154,10 @@ export function convertSvelteRoot(
154
154
style . body . loc . start . column += style . startTag . loc . end . column ;
155
155
style . body . loc . end . column -=
156
156
style . endTag . loc . end . column - style . endTag . loc . start . column ;
157
- style . body ?. walk ( ( node : ESLintCompatiblePostCSSNode < ChildNode > ) =>
157
+ style . body ?. walk ( ( node ) =>
158
158
convertPostCSSNodeToESLintNode ( node , style . loc , contentRange )
159
159
) ;
160
- style . body . parent = style ;
160
+ style . body . parent = style as unknown as Document ;
161
161
delete style . body . source ?. input . file ;
162
162
}
163
163
ctx . addToken ( "HTMLText" , contentRange ) ;
0 commit comments