Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed as not planned
Closed as not planned
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread the FAQ and my problem is not listed.
Relevant Package
parser
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
I've heard of two requests aroundEXPERIMENTAL_useProjectService
:
- Customize the default options in the case of a
tsconfig.json
not existing:https://discord.com/channels/508357248330760243/640177429775777792/1163326359100199012 - Warn if it's being used:feat(typescript-estree): add allowDefaultProjectForFiles project service allowlist option #7752 (comment)
These are technically two requests, but I think it'd be good to discuss them together. Whatever API we end up going with may need to accommodate both.
Proposal: how about afallbackCompilerOptions
?
typeFallbackCompilerOptions=/* Don't allow fallback/inferred projects at all */|"error"/* Allow fallback/inferred projects but log a warning */|"warn"/* Directly use these */ts.CompilerOptions;// (approximation of the shape we'd allow)interfaceProjectServiceParserOptions{EXPERIMENTAL_useProjectService:true;// If undefined, go with TypeScript's defaultsfallbackCompilerOptions?:FallbackCompilerOptions;}
Additional Info
Courtesy of@jakebailey inhttps://discord.com/channels/508357248330760243/1163326359100199012/1163526441103802398: project services have asetCompilerOptionsForInferredProjects
we can use.
#7752 largely enables the case of an inferred project in the first place.
Edit: oh, and also mentioned here:#6575 (comment)