oxc/crates
no-yan ecce5c53f8
refactor(linter): improve recursive argument handling and diagnostics creation (#6513)
### Overview
This PR refactors `only-used-in-recursion` codebase to make the
implementation of #5530 easier.

The diff isn't displaying cleanly, so it might be better to review it
commit by commit when looking at the changes.

### Key changes
1. Extracted diagnostic logic into `craete_diagnostic` function:
3bf00152e9359d26dccc75bc7ae9fb03970fc409
2. Removed redundant check in `is_function_maybe_reassigned`:
a133ec63d12562bbcd4030fd5e4e7245380e5ced
3. Simplified `is_argument_only_used_in_recursion` by removing nesting:
6e6bd0495374528ec20458cb95247a8f88b1b260
2024-10-14 08:58:25 +08:00
..
oxc refactor(codegen)!: remove Codegen::enableSourceMap API (#6452) 2024-10-12 04:56:43 +00:00
oxc_allocator feat(allocator): add Vec::into_boxed_slice (#6195) 2024-10-12 04:29:43 +00:00
oxc_ast feat(ecmascript): add ToBoolean, ToNumber, ToString (#6502) 2024-10-13 11:03:08 +00:00
oxc_ast_macros release(crates): v0.31.0 (#6360) 2024-10-08 20:55:24 +08:00
oxc_cfg release(crates): v0.31.0 (#6360) 2024-10-08 20:55:24 +08:00
oxc_codegen refactor(codegen): rename CodeBuffer::print_bytes_unchecked method (#6517) 2024-10-13 13:14:49 +00:00
oxc_data_structures fix(data_structures): fix compilation failure on older Rust versions (#6526) 2024-10-13 17:32:10 +00:00
oxc_diagnostics release(crates): v0.31.0 (#6360) 2024-10-08 20:55:24 +08:00
oxc_ecmascript refactor(ecmascript): remove NumberValue (#6519) 2024-10-13 14:11:37 +00:00
oxc_index release(crates): v0.31.0 (#6360) 2024-10-08 20:55:24 +08:00
oxc_isolated_declarations refactor(ecmascript): move ToInt32 from oxc_syntax to oxc_ecmascript (#6471) 2024-10-12 09:29:46 +00:00
oxc_language_server feat(oxc_language_server): add diagnostic code with link (#6487) 2024-10-13 07:07:43 +00:00
oxc_linter refactor(linter): improve recursive argument handling and diagnostics creation (#6513) 2024-10-14 08:58:25 +08:00
oxc_macros feat(linter): add oxc-security/api-keys (#5906) 2024-09-22 22:39:56 +00:00
oxc_mangler feat(ast)! add source_text to Program (#6444) 2024-10-11 04:13:41 +00:00
oxc_minifier feat(minifier): implement collapse-variable-declarations (#6464) 2024-10-13 23:01:50 +08:00
oxc_module_lexer chore(oxc): rename crate oxc_syntax_operations to oxc_ecmascript (#6469) 2024-10-12 08:34:42 +00:00
oxc_parser refactor(parser): fix typo in var name (#6500) 2024-10-13 10:14:37 +00:00
oxc_prettier refactor(prettier)!: remove source_text argument from constructor (#6448) 2024-10-11 06:27:33 +00:00
oxc_regular_expression perf(regex): reduce string allocations in Display impls (#6528) 2024-10-13 19:34:18 +00:00
oxc_semantic chore(oxc): rename crate oxc_syntax_operations to oxc_ecmascript (#6469) 2024-10-12 08:34:42 +00:00
oxc_sourcemap release(crates): v0.31.0 (#6360) 2024-10-08 20:55:24 +08:00
oxc_span docs(span): document validity of ModuleKind::Unambiguous (#6423) 2024-10-10 14:59:41 +00:00
oxc_syntax refactor(ecmascript): move ToInt32 from oxc_syntax to oxc_ecmascript (#6471) 2024-10-12 09:29:46 +00:00
oxc_transformer feat(transformer): support helper loader (#6162) 2024-10-13 08:09:08 +00:00
oxc_traverse chore(oxc): rename crate oxc_syntax_operations to oxc_ecmascript (#6469) 2024-10-12 08:34:42 +00:00
oxc_wasm refactor(prettier)!: remove source_text argument from constructor (#6448) 2024-10-11 06:27:33 +00:00