oxc/crates
keita hino 35a0f895dc
fix(linter): Handle cases where createElement is an Identifier in is_create_element_call (#2474)
I fixed a false negative issue in the `is_create_element_call` function
where createElement was an Identifier.

https://github.com/oxc-project/oxc/blob/main/crates/oxc_linter/src/utils/react.rs#L13-L19

In the case of [eslint-plugin-react's button-has-type
rule](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md),
the following triggers the expected errors:
```ts
// error
React.createElement("button")
// error
createElement("button")
```

However, with Oxlint, it behaves differently:
```ts
// error
React.createElement("button")
// false negative
createElement("button")
```
2024-02-23 15:55:28 +08:00
..
oxc Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_allocator Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_ast refactor(ast): s/TSTypeOperatorType/TSTypeOperator to align with estree 2024-02-21 22:25:04 +08:00
oxc_cli feat(diagnostics): implement json reporter (#2452) 2024-02-20 15:33:28 +08:00
oxc_codegen refactor(ast): s/TSTypeOperatorType/TSTypeOperator to align with estree 2024-02-21 22:25:04 +08:00
oxc_diagnostics feat(diagnostics): implement json reporter (#2452) 2024-02-20 15:33:28 +08:00
oxc_index Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_js_regex Initialize JS Regex crates and def AST. (#1500) 2023-11-23 00:22:17 +08:00
oxc_language_server fix(vscode): incorrect diagnostic position (#2461) 2024-02-21 12:11:16 +08:00
oxc_linter fix(linter): Handle cases where createElement is an Identifier in is_create_element_call (#2474) 2024-02-23 15:55:28 +08:00
oxc_macros feat(linter): remove the --timings feature (#2049) 2024-01-16 14:21:04 +08:00
oxc_minifier refactor(ast): s/NumberLiteral/NumericLiteral to align with estree 2024-02-21 21:41:08 +08:00
oxc_parser refactor(ast): s/TSTypeOperatorType/TSTypeOperator to align with estree 2024-02-21 22:25:04 +08:00
oxc_prettier refactor(ast): s/TSTypeOperatorType/TSTypeOperator to align with estree 2024-02-21 22:25:04 +08:00
oxc_semantic refactor(ast): s/NumberLiteral/NumericLiteral to align with estree 2024-02-21 21:41:08 +08:00
oxc_span Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_syntax feat(Codegen): Improve codegen (#2460) 2024-02-21 14:41:57 +08:00
oxc_transformer feat(transformer/decorators): transform getter function (#2473) 2024-02-23 10:11:45 +08:00
oxc_wasm feat(codegen): configurable typescript codegen (#2443) 2024-02-20 12:09:28 +08:00