-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Add support for raising if you set a tsconfig entry of target/module with the right setting in the root #44964
Conversation
…with the right setting in the root
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.
This seems like a nice addition, but why limit it to target
and module
? Surely we have an array of all valid or common option names somewhere, right?
Just wanted to do the least to avoid this wrath by using what is probably always gonna be set there:
|
What if you detect all compilerOptions keys in the root, but only issue an error if there is no |
This idea is great, I'll switch it to that |
…lude compilerOptions
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.
All suggestions are for lazy array allocation
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
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.
Would be nice to just avoid the linter suppression.
src/compiler/commandLineParser.ts
Outdated
// eslint-disable-next-line no-in-operator | ||
if (rootCompilerOptions && json && !("compilerOptions" in json)) { |
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.
You could write json.compilerOptions === undefined
and avoid the linter suppression, right?
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.
There’s also a hasProperty
util
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
OK, I've had a few looks over this will merge it at end of day |
Fixes #43293