diff options
author | Luca Casonato <hello@lcas.dev> | 2024-09-27 16:14:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 14:14:17 +0000 |
commit | 6f0fbceaf213f523bc68d23ea28fd457499f3a75 (patch) | |
tree | 5080be4cf51993198dc3ad54b20889f25a7b93d0 /cli/args/mod.rs | |
parent | 3134abefa462ead8bb8e2e4aa8a5b57910f3d430 (diff) |
fix(lint): correctly handle old jsx in linter (#25902)
Previously the CLI was incorrectly reporting `React` as unused in a JSX
file that uses the "old" transform.
The LSP was already handling this correctly.
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r-- | cli/args/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index a11d3bc10..995a04823 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1327,11 +1327,9 @@ impl CliOptions { )?; Ok(deno_lint::linter::LintConfig { - default_jsx_factory: transpile_options - .jsx_automatic + default_jsx_factory: (!transpile_options.jsx_automatic) .then(|| transpile_options.jsx_factory.clone()), - default_jsx_fragment_factory: transpile_options - .jsx_automatic + default_jsx_fragment_factory: (!transpile_options.jsx_automatic) .then(|| transpile_options.jsx_fragment_factory.clone()), }) } |