File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
docs-svelte-kit/src/lib/components Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 10
10
postprocess ,
11
11
} from " ../eslint/scripts/linter.js"
12
12
import { loadModulesForBrowser } from " ../../../../src/shared/svelte-compile-warns/transform/load-module"
13
+ let tsParser = null
13
14
const linter = loadModulesForBrowser ()
14
15
.then (async () => {
15
- const parser = await import (" @typescript-eslint/parser" )
16
- if (typeof window !== " undefined" ) {
17
- window .require .define (" @typescript-eslint/parser" , parser)
18
- }
16
+ tsParser = await import (" @typescript-eslint/parser" )
19
17
})
20
18
.then (() => {
21
19
return createLinter ()
171
169
ecmaVersion: 2020 ,
172
170
sourceType: " module" ,
173
171
parser: {
174
- ts: " @typescript-eslint/parser " ,
175
- typescript: " @typescript-eslint/parser " ,
172
+ ts: tsParser ,
173
+ typescript: tsParser ,
176
174
},
177
175
},
178
176
rules,
Original file line number Diff line number Diff line change 66
66
"postcss-load-config" : " ^3.1.4" ,
67
67
"postcss-safe-parser" : " ^6.0.0" ,
68
68
"sourcemap-codec" : " ^1.4.8" ,
69
- "svelte-eslint-parser" : " ^0.17 .0"
69
+ "svelte-eslint-parser" : " ^0.18 .0"
70
70
},
71
71
"devDependencies" : {
72
72
"@babel/core" : " ^7.16.0" ,
You can’t perform that action at this time.
0 commit comments