Skip to content

Commit 3be408d

Browse files
committed
add tests
1 parent 67b5adf commit 3be408d

17 files changed

+14780
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default [
100100
parser: svelteParser,
101101
parserOptions: {
102102
sourceType: "module",
103-
ecmaVersion: 2022,
103+
ecmaVersion: 2024,
104104
ecmaFeatures: {
105105
globalReturn: false,
106106
impliedStrict: false,

explorer-v2/src/lib/ESLintPlayground.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
languageOptions: {
120120
parser: svelteEslintParser,
121121
parserOptions: {
122-
ecmaVersion: 2022,
122+
ecmaVersion: 2024,
123123
sourceType: 'module',
124124
parser: { ts: tsParser, typescript: tsParser }
125125
},

src/parser/parser-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export type NormalizedParserOptions = {
4141
/** Normalize parserOptions */
4242
export function normalizeParserOptions(options: any): NormalizedParserOptions {
4343
const parserOptions = {
44-
ecmaVersion: 2022,
44+
ecmaVersion: 2024,
4545
sourceType: "module",
4646
loc: true,
4747
range: true,
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script>
2+
const one = async () => {
3+
await new Promise((f) => setTimeout(f, 500)); // artificial delay
4+
return 1;
5+
};
6+
7+
const two = async () => {
8+
await new Promise((f) => setTimeout(f, 500)); // artificial delay
9+
return 2;
10+
};
11+
</script>
12+
13+
<p>{await one()}</p>
14+
<p>{await two()}</p>

0 commit comments

Comments
 (0)