File tree 5 files changed +14
-6
lines changed
5 files changed +14
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " typescript-eslint-parser-for-extra-files " : minor
3
+ ---
4
+
5
+ feat: update svelte2tsx to >=0.7.9
Original file line number Diff line number Diff line change 1
- package-lock = false
1
+ package-lock = false
2
+ force = true
Original file line number Diff line number Diff line change 50
50
"peerDependencies" : {
51
51
"@typescript-eslint/parser" : " >=5.41.0" ,
52
52
"astrojs-compiler-sync" : " >=0.3.1" ,
53
- "svelte2tsx" : " >=0.5.20 " ,
53
+ "svelte2tsx" : " >=0.7.9 " ,
54
54
"typescript" : " >=4.8.4" ,
55
55
"vue" : " ^3.2.45"
56
56
},
Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ export function transformForSvelte(
7
7
if ( context . current ) {
8
8
return code ;
9
9
}
10
+
10
11
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- ignore
11
12
const svelte2tsx : typeof Svelte2tsx = require ( "svelte2tsx" ) ;
12
13
const result = svelte2tsx . svelte2tsx ( code , {
13
14
filename : context . filePath ,
14
15
} ) ;
15
16
16
- return `/// <reference types="svelte2tsx/svelte-shims" />
17
-
17
+ return `/// <reference types="svelte2tsx/svelte-shims-v4" />
18
+ /// <reference types="svelte2tsx/svelte-shims" />
19
+
18
20
${ result . code } `;
19
21
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type * as tsEslintParser from "@typescript-eslint/parser";
2
2
import path from "path" ;
3
3
import * as vueParser from "vue-eslint-parser" ;
4
4
5
- const PROJECT_ROOT = path . join ( __dirname , "../../.." ) ;
5
+ const PROJECT_ROOT = path . normalize ( path . join ( __dirname , "../../.." ) ) ;
6
6
7
7
export function buildTypes (
8
8
input : string ,
@@ -59,7 +59,7 @@ export function buildTypes(
59
59
return `${ l } // ${ types [ i ] . join ( ", " ) . replace ( / \n \s * / g, " " ) } ` ;
60
60
} )
61
61
. join ( "\n" )
62
- . replace ( new RegExp ( escapeRegExp ( PROJECT_ROOT ) , "gu " ) , "" ) ;
62
+ . replace ( new RegExp ( escapeRegExp ( PROJECT_ROOT ) , "giu " ) , "" ) ;
63
63
}
64
64
65
65
function escapeRegExp ( string : string ) {
You can’t perform that action at this time.
0 commit comments