fix: error on invalid & unsupported jsx compiler options (#19954)

This commit is contained in:
David Sherret 2023-07-27 12:15:39 -04:00 committed by GitHub
parent 806137bb96
commit 02d6bbff2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 18 deletions

View file

@ -914,11 +914,11 @@ impl CliOptions {
/// Return the JSX import source configuration.
pub fn to_maybe_jsx_import_source_config(
&self,
) -> Option<JsxImportSourceConfig> {
self
.maybe_config_file
.as_ref()
.and_then(|c| c.to_maybe_jsx_import_source_config())
) -> Result<Option<JsxImportSourceConfig>, AnyError> {
match self.maybe_config_file.as_ref() {
Some(config) => config.to_maybe_jsx_import_source_config(),
None => Ok(None),
}
}
/// Return any imports that should be brought into the scope of the module