Skip to content

Commit 6353982

Browse files
committed
add projectService: undefined
1 parent 78db8a8 commit 6353982

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

Diff for: src/common/parser-options.ts

+8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export interface ParserOptions {
3030
lib?: string[]
3131

3232
project?: string | string[]
33+
projectService?: boolean | ProjectServiceOptions
3334
projectFolderIgnoreList?: string[]
3435
tsconfigRootDir?: string
3536
extraFileExtensions?: string[]
@@ -55,6 +56,13 @@ export interface ParserOptions {
5556
>
5657
}
5758

59+
interface ProjectServiceOptions {
60+
allowDefaultProject?: string[]
61+
defaultProject?: string
62+
loadTypeScriptPlugins?: boolean
63+
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number
64+
}
65+
5866
export function isSFCFile(parserOptions: ParserOptions) {
5967
if (parserOptions.filePath === "<input>") {
6068
return true

Diff for: src/html/parser.ts

+1
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ export class Parser {
303303
},
304304
),
305305
project: undefined,
306+
projectService: undefined,
306307
}
307308
const scriptParserOptions = {
308309
...this.baseParserOptions,

Diff for: src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ function parseAsSFC(code: string, options: ParserOptions) {
166166
yield getParserLangFromSFC(rootAST)
167167
}),
168168
project: undefined,
169+
projectService: undefined,
169170
})
170171
}
171172
result.ast.templateBody = templateBody

Diff for: src/script-setup/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function getScriptSetupCodeBlocks(
518518

519519
const { ast, visitorKeys } = parseScript(
520520
scriptCode,
521-
{ ...parserOptions, project: undefined },
521+
{ ...parserOptions, project: undefined, projectService: undefined },
522522
offsetLocationCalculator,
523523
)
524524

Diff for: src/script/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ export function parseGenericExpression(
13021302
const result = parseScriptFragmentWithOption(
13031303
scriptLet,
13041304
locationCalculator.getSubCalculatorShift(-14),
1305-
{ ...parserOptions, project: undefined },
1305+
{ ...parserOptions, project: undefined, projectService: undefined },
13061306
{
13071307
preFixLocationProcess(preResult) {
13081308
const params = getParams(preResult)

0 commit comments

Comments
 (0)