Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2bbf656

Browse files
authored
fix(types): correct typing ParserOptions (typescript-eslint#9202)
* fix(types): correct typing `ParserOptions` * chore(parser): refactor to prevent incompatible typing
1 parent f553c68 commit 2bbf656

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/parser/src/parser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ function parseForESLint(
103103
options.ecmaFeatures = {};
104104
}
105105

106-
const parserOptions: TSESTreeOptions = {};
107-
Object.assign(parserOptions, options, {
106+
const parserOptions: TSESTreeOptions = {
107+
...options,
108108
jsx: validateBoolean(options.ecmaFeatures.jsx),
109109
/**
110110
* Override errorOnTypeScriptSyntacticAndSemanticIssues and set it to false to prevent use from user config
111111
* https://github.com/typescript-eslint/typescript-eslint/issues/8681#issuecomment-2000411834
112112
*/
113113
errorOnTypeScriptSyntacticAndSemanticIssues: false,
114-
});
114+
};
115115
const analyzeOptions: AnalyzeOptions = {
116116
globalReturn: options.ecmaFeatures.globalReturn,
117117
jsxPragma: options.jsxPragma,

packages/types/src/parser-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ interface ParserOptions {
7070
loc?: boolean;
7171
programs?: Program[] | null;
7272
project?: string[] | string | boolean | null;
73-
projectFolderIgnoreList?: (RegExp | string)[];
73+
projectFolderIgnoreList?: string[];
7474
range?: boolean;
7575
sourceType?: SourceType | undefined;
7676
tokens?: boolean;

0 commit comments

Comments
 (0)