-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(parser): error when both projectService
and project
are set
#11333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -145,6 +145,12 @@ | |||||
tsconfigRootDir, | ||||||
}; | ||||||
|
||||||
if (parseSettings.projectService && tsestreeOptions.project) { | ||||||
throw new Error( | ||||||
Check failure on line 149 in packages/typescript-estree/src/parseSettings/createParseSettings.ts
|
||||||
'Cannot use both projectService and project parser options.', | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Docs] I think users who are enabling both are probably not super familiar with them. We'll need to guide them a bit more. Maybe something like...
Suggested change
Note that we can't assume |
||||||
); | ||||||
} | ||||||
|
||||||
// debug doesn't support multiple `enable` calls, so have to do it all at once | ||||||
if (parseSettings.debugLevel.size > 0) { | ||||||
const namespaces = []; | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Testing] Looks like our own test infrastructure is getting in the way. Both are set because that was easier to do in CI:
typescript-eslint/.github/workflows/ci.yml
Lines 256 to 260 in 702cea8
typescript-eslint/packages/typescript-estree/src/parseSettings/createParseSettings.ts
Lines 116 to 125 in 4ad8a07
Maybe we should temporarily give users a way to disable the new error?
TYPESCRIPT_ESLINT_IGNORE_PROJECT_AND_PROJECT_SERVICE_ERROR
or some similarly unwieldy name? I'll post in #11319.