oxc/crates
DonIsaac ea908f742d refactor(linter): consolidate file loading logic (#6130)
# Human Description
Low on time, so this one is short.
- consolidate source file and partial loader logic into `loader` module. I have more plans for this.
- ~LSP no longer uses `VALID_EXTENSIONS`, so now `.d.ts` files (and the like) will be linted as well~ LSP does not respect `.gitignore` files, so this change was reverted.

# AI Description
## Refactor Loader and Partial Loader

This PR refactors the loader and partial loader functionality in the oxc_linter crate:

* Introduce a new `Loader` struct with methods for checking if a file can be loaded and loading file contents
* Move `partial_loader` module to `loader/partial_loader`
* Rename `JavaScriptSource` to `source.rs` and move it to the `loader` module
* Update `JavaScriptSource` to use `u32` for `start` offset instead of `usize`
* Refactor `IsolatedLintHandler` to use the new `Loader`
* Update imports and module references throughout the codebase

This change improves the organization of the loader-related code and provides a more unified interface for loading different file types.
2024-09-29 02:48:01 +00:00
..
oxc release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_allocator release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_ast release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_ast_macros release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_cfg release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_codegen refactor(codegen): restrict visibility of internal methods (#6145) 2024-09-28 14:33:42 +00:00
oxc_diagnostics release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_index release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_isolated_declarations release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_language_server refactor(linter): consolidate file loading logic (#6130) 2024-09-29 02:48:01 +00:00
oxc_linter refactor(linter): consolidate file loading logic (#6130) 2024-09-29 02:48:01 +00:00
oxc_macros feat(linter): add oxc-security/api-keys (#5906) 2024-09-22 22:39:56 +00:00
oxc_mangler release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_minifier release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_module_lexer release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_parser release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_prettier refactor(ast): move all ts ast related impl methods to ast_impl (#6015) 2024-09-24 06:07:37 +00:00
oxc_regular_expression release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_semantic release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_sourcemap release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_span release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_syntax release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_transformer fix(transformer/react): should not collect use-hooks if it's a nested member expression (#6143) 2024-09-28 14:38:14 +00:00
oxc_traverse release(crates): v0.30.4 (#6134) 2024-09-28 13:08:44 +08:00
oxc_wasm feat(oxc_wasm): add verbse option to debug_dot (#5879) 2024-09-19 06:13:03 +00:00