;
@@ -56,6 +56,7 @@ export function analyzeTypeScriptInSvelte(
project: null,
},
) as unknown as TSESParseForESLintResult;
+ context.svelteParseContext.analyzeRunesMode(result.scopeManager as never);
ctx._beforeResult = result;
@@ -103,6 +104,7 @@ export function analyzeTypeScript(
// Without typings
project: null,
}) as unknown as TSESParseForESLintResult;
+ svelteParseContext.analyzeRunesMode(result.scopeManager as never);
ctx._beforeResult = result;
diff --git a/tests/fixtures/integrations/snippet-scope/ts-snippet-hoist-scope-setup.ts b/tests/fixtures/integrations/snippet-scope/ts-snippet-hoist-scope-setup.ts
index 6ea0958b..987969b6 100644
--- a/tests/fixtures/integrations/snippet-scope/ts-snippet-hoist-scope-setup.ts
+++ b/tests/fixtures/integrations/snippet-scope/ts-snippet-hoist-scope-setup.ts
@@ -14,7 +14,6 @@ export function getConfig() {
parser: "svelte-eslint-parser",
parserOptions: {
...generateParserOptions(),
- svelteFeatures: { runes: true },
},
rules: {
"@typescript-eslint/no-unused-vars": "error",
diff --git a/tests/fixtures/integrations/type-info-tests/$derived-setup.ts b/tests/fixtures/integrations/type-info-tests/$derived-setup.ts
index d53704e5..3fe79740 100644
--- a/tests/fixtures/integrations/type-info-tests/$derived-setup.ts
+++ b/tests/fixtures/integrations/type-info-tests/$derived-setup.ts
@@ -30,7 +30,6 @@ export function getConfig() {
parser: "svelte-eslint-parser",
parserOptions: {
...generateParserOptions(),
- svelteFeatures: { runes: true },
},
rules: {
"@typescript-eslint/no-unsafe-argument": "error",
diff --git a/tests/fixtures/integrations/type-info-tests/$derived-ts-setup.ts b/tests/fixtures/integrations/type-info-tests/$derived-ts-setup.ts
index d53704e5..3fe79740 100644
--- a/tests/fixtures/integrations/type-info-tests/$derived-ts-setup.ts
+++ b/tests/fixtures/integrations/type-info-tests/$derived-ts-setup.ts
@@ -30,7 +30,6 @@ export function getConfig() {
parser: "svelte-eslint-parser",
parserOptions: {
...generateParserOptions(),
- svelteFeatures: { runes: true },
},
rules: {
"@typescript-eslint/no-unsafe-argument": "error",
diff --git a/tests/fixtures/integrations/type-info-tests/$derived2-setup.ts b/tests/fixtures/integrations/type-info-tests/$derived2-setup.ts
index d53704e5..3fe79740 100644
--- a/tests/fixtures/integrations/type-info-tests/$derived2-setup.ts
+++ b/tests/fixtures/integrations/type-info-tests/$derived2-setup.ts
@@ -30,7 +30,6 @@ export function getConfig() {
parser: "svelte-eslint-parser",
parserOptions: {
...generateParserOptions(),
- svelteFeatures: { runes: true },
},
rules: {
"@typescript-eslint/no-unsafe-argument": "error",
diff --git a/tests/fixtures/integrations/type-info-tests/$derived2-ts-setup.ts b/tests/fixtures/integrations/type-info-tests/$derived2-ts-setup.ts
index b1b1f599..3a7d2c48 100644
--- a/tests/fixtures/integrations/type-info-tests/$derived2-ts-setup.ts
+++ b/tests/fixtures/integrations/type-info-tests/$derived2-ts-setup.ts
@@ -30,7 +30,6 @@ export function getConfig() {
parser: "svelte-eslint-parser",
parserOptions: {
...generateParserOptions(),
- svelteFeatures: { runes: true },
},
rules: {
"@typescript-eslint/no-unsafe-argument": "error",
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-config.json b/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-config.json
new file mode 100644
index 00000000..68f794a1
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-config.json
@@ -0,0 +1,5 @@
+{
+ "svelteFeatures": {
+ "runes": "auto"
+ }
+}
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-input.svelte b/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-input.svelte
new file mode 100644
index 00000000..60106664
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-input.svelte
@@ -0,0 +1,5 @@
+
+
+{p}
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-output.json b/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-output.json
new file mode 100644
index 00000000..0ccd50d3
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-output.json
@@ -0,0 +1,860 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "SvelteScriptElement",
+ "name": {
+ "type": "SvelteName",
+ "name": "script",
+ "range": [
+ 1,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ }
+ },
+ "startTag": {
+ "type": "SvelteStartTag",
+ "attributes": [],
+ "selfClosing": false,
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "kind": "const",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "ObjectPattern",
+ "properties": [
+ {
+ "type": "Property",
+ "kind": "init",
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "value": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ],
+ "range": [
+ 16,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "arguments": [],
+ "callee": {
+ "type": "Identifier",
+ "name": "$props",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "optional": false,
+ "range": [
+ 24,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 16,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ }
+ }
+ ],
+ "range": [
+ 10,
+ 33
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 24
+ }
+ }
+ }
+ ],
+ "endTag": {
+ "type": "SvelteEndTag",
+ "range": [
+ 34,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ }
+ },
+ "range": [
+ 0,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "SvelteText",
+ "value": "\n\n",
+ "range": [
+ 43,
+ 45
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ }
+ },
+ {
+ "type": "SvelteElement",
+ "kind": "html",
+ "name": {
+ "type": "SvelteName",
+ "name": "span",
+ "range": [
+ 46,
+ 50
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 1
+ },
+ "end": {
+ "line": 5,
+ "column": 5
+ }
+ }
+ },
+ "startTag": {
+ "type": "SvelteStartTag",
+ "attributes": [],
+ "selfClosing": false,
+ "range": [
+ 45,
+ 51
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 6
+ }
+ }
+ },
+ "children": [
+ {
+ "type": "SvelteMustacheTag",
+ "kind": "text",
+ "expression": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 52,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 51,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 6
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "endTag": {
+ "type": "SvelteEndTag",
+ "range": [
+ 54,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 16
+ }
+ }
+ },
+ "range": [
+ 45,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "range": [
+ 0,
+ 1
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ }
+ },
+ {
+ "type": "HTMLIdentifier",
+ "value": "script",
+ "range": [
+ 1,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ }
+ },
+ {
+ "type": "Keyword",
+ "value": "const",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "{",
+ "range": [
+ 16,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "value": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "}",
+ "range": [
+ 20,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "=",
+ "range": [
+ 22,
+ 23
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "value": "$props",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "(",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ")",
+ "range": [
+ 31,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 22
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ";",
+ "range": [
+ 32,
+ 33
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 23
+ },
+ "end": {
+ "line": 2,
+ "column": 24
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "range": [
+ 34,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "/",
+ "range": [
+ 35,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 1
+ },
+ "end": {
+ "line": 3,
+ "column": 2
+ }
+ }
+ },
+ {
+ "type": "HTMLIdentifier",
+ "value": "script",
+ "range": [
+ 36,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "range": [
+ 42,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "HTMLText",
+ "value": "\n\n",
+ "range": [
+ 43,
+ 45
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "range": [
+ 45,
+ 46
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ }
+ },
+ {
+ "type": "HTMLIdentifier",
+ "value": "span",
+ "range": [
+ 46,
+ 50
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 1
+ },
+ "end": {
+ "line": 5,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "range": [
+ 50,
+ 51
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 5
+ },
+ "end": {
+ "line": 5,
+ "column": 6
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "{",
+ "range": [
+ 51,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 6
+ },
+ "end": {
+ "line": 5,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "value": "p",
+ "range": [
+ 52,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "}",
+ "range": [
+ 53,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "range": [
+ 54,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "/",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "HTMLIdentifier",
+ "value": "span",
+ "range": [
+ 56,
+ 60
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 11
+ },
+ "end": {
+ "line": 5,
+ "column": 15
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "range": [
+ 60,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 15
+ },
+ "end": {
+ "line": 5,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "range": [
+ 0,
+ 62
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 0
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-scope-output.json b/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-scope-output.json
new file mode 100644
index 00000000..c8c1da71
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-with-$props-scope-output.json
@@ -0,0 +1,487 @@
+{
+ "type": "global",
+ "variables": [
+ {
+ "name": "$$slots",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$$props",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$$restProps",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$state",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$derived",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$effect",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$props",
+ "identifiers": [],
+ "defs": [],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "$props",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": null
+ }
+ ]
+ },
+ {
+ "name": "$bindable",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$inspect",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$host",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ }
+ ],
+ "references": [],
+ "childScopes": [
+ {
+ "type": "module",
+ "variables": [
+ {
+ "name": "p",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "Variable",
+ "name": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "node": {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "ObjectPattern",
+ "properties": [
+ {
+ "type": "Property",
+ "kind": "init",
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "value": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ],
+ "range": [
+ 16,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "arguments": [],
+ "callee": {
+ "type": "Identifier",
+ "name": "$props",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "optional": false,
+ "range": [
+ 24,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 16,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ }
+ }
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "from": "module",
+ "init": true,
+ "resolved": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 52,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "from": "module",
+ "init": true,
+ "resolved": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "$props",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": null
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 52,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ }
+ ],
+ "childScopes": [],
+ "through": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "$props",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": null
+ }
+ ]
+ }
+ ],
+ "through": []
+}
\ No newline at end of file
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-config.json b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-config.json
new file mode 100644
index 00000000..68f794a1
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-config.json
@@ -0,0 +1,5 @@
+{
+ "svelteFeatures": {
+ "runes": "auto"
+ }
+}
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-input.svelte b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-input.svelte
new file mode 100644
index 00000000..b241ef28
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-input.svelte
@@ -0,0 +1,5 @@
+
+
+{p}
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-no-undef-result.json b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-no-undef-result.json
new file mode 100644
index 00000000..86654fcb
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-no-undef-result.json
@@ -0,0 +1,8 @@
+[
+ {
+ "ruleId": "no-undef",
+ "code": "props",
+ "line": 2,
+ "column": 16
+ }
+]
\ No newline at end of file
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-output.json b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-output.json
new file mode 100644
index 00000000..9288b716
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-output.json
@@ -0,0 +1,860 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "SvelteScriptElement",
+ "name": {
+ "type": "SvelteName",
+ "name": "script",
+ "range": [
+ 1,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ }
+ },
+ "startTag": {
+ "type": "SvelteStartTag",
+ "attributes": [],
+ "selfClosing": false,
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "kind": "const",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "ObjectPattern",
+ "properties": [
+ {
+ "type": "Property",
+ "kind": "init",
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "value": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ],
+ "range": [
+ 16,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "arguments": [],
+ "callee": {
+ "type": "Identifier",
+ "name": "props",
+ "range": [
+ 24,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ }
+ },
+ "optional": false,
+ "range": [
+ 24,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ }
+ },
+ "range": [
+ 16,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ }
+ }
+ ],
+ "range": [
+ 10,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ }
+ }
+ ],
+ "endTag": {
+ "type": "SvelteEndTag",
+ "range": [
+ 33,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ }
+ },
+ "range": [
+ 0,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "SvelteText",
+ "value": "\n\n",
+ "range": [
+ 42,
+ 44
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ }
+ },
+ {
+ "type": "SvelteElement",
+ "kind": "html",
+ "name": {
+ "type": "SvelteName",
+ "name": "span",
+ "range": [
+ 45,
+ 49
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 1
+ },
+ "end": {
+ "line": 5,
+ "column": 5
+ }
+ }
+ },
+ "startTag": {
+ "type": "SvelteStartTag",
+ "attributes": [],
+ "selfClosing": false,
+ "range": [
+ 44,
+ 50
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 6
+ }
+ }
+ },
+ "children": [
+ {
+ "type": "SvelteMustacheTag",
+ "kind": "text",
+ "expression": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 51,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 50,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 6
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "endTag": {
+ "type": "SvelteEndTag",
+ "range": [
+ 53,
+ 60
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 16
+ }
+ }
+ },
+ "range": [
+ 44,
+ 60
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "range": [
+ 0,
+ 1
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 1
+ }
+ }
+ },
+ {
+ "type": "HTMLIdentifier",
+ "value": "script",
+ "range": [
+ 1,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 1
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ }
+ },
+ {
+ "type": "Keyword",
+ "value": "const",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 1
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "{",
+ "range": [
+ 16,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "value": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "}",
+ "range": [
+ 20,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "=",
+ "range": [
+ 22,
+ 23
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "value": "props",
+ "range": [
+ 24,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "(",
+ "range": [
+ 29,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 20
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ")",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ";",
+ "range": [
+ 31,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 22
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "range": [
+ 33,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 1
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "/",
+ "range": [
+ 34,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 1
+ },
+ "end": {
+ "line": 3,
+ "column": 2
+ }
+ }
+ },
+ {
+ "type": "HTMLIdentifier",
+ "value": "script",
+ "range": [
+ 35,
+ 41
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "range": [
+ 41,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "HTMLText",
+ "value": "\n\n",
+ "range": [
+ 42,
+ 44
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "range": [
+ 44,
+ 45
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 1
+ }
+ }
+ },
+ {
+ "type": "HTMLIdentifier",
+ "value": "span",
+ "range": [
+ 45,
+ 49
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 1
+ },
+ "end": {
+ "line": 5,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "range": [
+ 49,
+ 50
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 5
+ },
+ "end": {
+ "line": 5,
+ "column": 6
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "{",
+ "range": [
+ 50,
+ 51
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 6
+ },
+ "end": {
+ "line": 5,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "value": "p",
+ "range": [
+ 51,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "}",
+ "range": [
+ 52,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "range": [
+ 53,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": "/",
+ "range": [
+ 54,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "HTMLIdentifier",
+ "value": "span",
+ "range": [
+ 55,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 11
+ },
+ "end": {
+ "line": 5,
+ "column": 15
+ }
+ }
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "range": [
+ 59,
+ 60
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 15
+ },
+ "end": {
+ "line": 5,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "range": [
+ 0,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 0
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-scope-output.json b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-scope-output.json
new file mode 100644
index 00000000..5414af01
--- /dev/null
+++ b/tests/fixtures/parser/ast/svelte5/runes-auto-without-runes-scope-output.json
@@ -0,0 +1,445 @@
+{
+ "type": "global",
+ "variables": [
+ {
+ "name": "$$slots",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$$props",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "$$restProps",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ }
+ ],
+ "references": [],
+ "childScopes": [
+ {
+ "type": "module",
+ "variables": [
+ {
+ "name": "p",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "Variable",
+ "name": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "node": {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "ObjectPattern",
+ "properties": [
+ {
+ "type": "Property",
+ "kind": "init",
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "value": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ ],
+ "range": [
+ 16,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "arguments": [],
+ "callee": {
+ "type": "Identifier",
+ "name": "props",
+ "range": [
+ 24,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ }
+ },
+ "optional": false,
+ "range": [
+ 24,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ }
+ },
+ "range": [
+ 16,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ }
+ }
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "from": "module",
+ "init": true,
+ "resolved": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 51,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ "from": "module",
+ "init": true,
+ "resolved": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "props",
+ "range": [
+ 24,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": null
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 51,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": {
+ "type": "Identifier",
+ "name": "p",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ }
+ }
+ ],
+ "childScopes": [],
+ "through": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "props",
+ "range": [
+ 24,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": null
+ }
+ ]
+ }
+ ],
+ "through": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "props",
+ "range": [
+ 24,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ }
+ },
+ "from": "module",
+ "init": null,
+ "resolved": null
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tests/src/parser/typescript/index.ts b/tests/src/parser/typescript/index.ts
index 49051278..48c3a851 100644
--- a/tests/src/parser/typescript/index.ts
+++ b/tests/src/parser/typescript/index.ts
@@ -1,7 +1,10 @@
import { Context } from "../../../../src/context";
import type { NormalizedParserOptions } from "../../../../src/parser/parser-options";
import { parseScriptInSvelte } from "../../../../src/parser/script";
-import { compilerVersion } from "../../../../src/parser/svelte-version";
+import {
+ SvelteParseContext,
+ RunesMode,
+} from "../../../../src/parser/svelte-parse-context";
import { parseTemplate } from "../../../../src/parser/template";
import { parseTypeScriptInSvelte } from "../../../../src/parser/typescript";
import { generateParserOptions, listupFixtures } from "../test-utils";
@@ -50,11 +53,7 @@ describe("Check for typescript analyze result.", () => {
parserOptions,
{
slots: new Set(),
- svelteParseContext: {
- runes: true,
- compilerVersion,
- svelteConfig: null,
- },
+ svelteParseContext: new SvelteParseContext(RunesMode.auto, null),
},
);
const result = parseScriptInSvelte(
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy