oxc/crates/oxc_linter
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
..
examples
fixtures
src fix(linter): tree_shaking/no_side_effects_in_initialization handle JSX correctly (#5450) 2024-09-05 02:06:19 +00:00
tests
Cargo.toml refactor(linter): use "parsed pattern" in no_div_regex rule. (#5417) 2024-09-04 14:00:47 +00:00
CHANGELOG.md Release oxlint v0.9.2 (#5401) 2024-09-02 20:30:22 +08:00