oxc/crates
overlookmotel 82c0a167c4 fix(linter): tree_shaking/no_side_effects_in_initialization handle JSX correctly (#5450)
#5223 altered `JSXElementName` so `JSXElementName::Identifier` is used only for non-reference JSX names (e.g. `<div>`). `JSXElementName::IdentifierReference` is used where the name is a reference (e.g. `<Foo>`). Similarly `JSXMemberExpressionObject`'s `object` is always an `IdentifierReference` now.

So, the net result is that `JSXIdentifier` is now never a reference, it's just the JSX equivalent of `IdentifierName`. So I don't think `JSXIdentifier` can ever have side-effects.

This PR:

1. Removes `impl ListenerMap for JSXIdentifier`
2. Adds `impl ListenerMap for JSXMemberExpression` and makes sure the root `IdentifierReference` (`Foo` in `<Foo.bar.qux>`) is visited.
2024-09-05 02:06:19 +00:00
..
oxc Release crates v0.26.0 (#5418) 2024-09-03 10:36:02 +08:00
oxc_allocator Release crates v0.26.0 (#5418) 2024-09-03 10:36:02 +08:00
oxc_ast feat(semantic): check for non-declared, non-abstract object accessors without bodies (#5461) 2024-09-05 01:33:10 +00:00
oxc_ast_macros feat(ast): add ContentEq trait. (#5427) 2024-09-04 11:53:50 +00:00
oxc_cfg Release crates v0.26.0 (#5418) 2024-09-03 10:36:02 +08:00
oxc_codegen refactor(ast)!: rename Expression::without_parentheses (#5448) 2024-09-05 01:25:00 +00:00
oxc_diagnostics Release crates v0.26.0 (#5418) 2024-09-03 10:36:02 +08:00
oxc_index feat(index): impl rayon related to trait for IndexVec (#5421) 2024-09-03 12:01:57 +00:00
oxc_isolated_declarations Release crates v0.26.0 (#5418) 2024-09-03 10:36:02 +08:00
oxc_language_server refactor(parser)!: remove builder pattern from Parser struct (#5000) 2024-08-20 07:40:25 +00:00
oxc_linter fix(linter): tree_shaking/no_side_effects_in_initialization handle JSX correctly (#5450) 2024-09-05 02:06:19 +00:00
oxc_macros chore(linter): update docs for declare_oxc_lint! (#4825) 2024-08-11 15:27:54 +00:00
oxc_mangler Release crates v0.26.0 (#5418) 2024-09-03 10:36:02 +08:00
oxc_minifier feat(minifier): remove parenthesized expression for dce (#5439) 2024-09-04 12:58:39 +00:00
oxc_module_lexer Release crates v0.26.0 (#5418) 2024-09-03 10:36:02 +08:00
oxc_parser feat(parser): add syntax error for hyphen in JSXMemberExpression <Foo.bar-baz /> (#5440) 2024-09-04 14:09:06 +00:00
oxc_prettier feat(ast, parser): add oxc_regular_expression types to the parser and AST. (#5256) 2024-09-03 02:36:37 +00:00
oxc_regular_expression feat(ast): add ContentEq trait. (#5427) 2024-09-04 11:53:50 +00:00
oxc_semantic refactor(semantic): change the reference flag to ReferenceFlags::Type if it is used within a TSTypeQuery (#5444) 2024-09-05 01:50:20 +00:00
oxc_sourcemap Release crates v0.26.0 (#5418) 2024-09-03 10:36:02 +08:00
oxc_span feat(ast): add ContentEq trait. (#5427) 2024-09-04 11:53:50 +00:00
oxc_syntax refactor(semantic): change the reference flag to ReferenceFlags::Type if it is used within a TSTypeQuery (#5444) 2024-09-05 01:50:20 +00:00
oxc_transformer refactor(transformer/typescript): move all entry points to implementation of Traverse trait (#5422) 2024-09-03 18:26:20 +00:00
oxc_traverse refactor(ast): remove IdentifierName from TSThisParameter (#5327) 2024-09-04 12:46:53 +00:00
oxc_wasm feat(wasm): turn on all transform options 2024-09-01 00:24:10 +08:00