Commit Graph

4 Commits

Author SHA1 Message Date
leaysgur 1ccaf767d6 refactor(oxlint,oxfmt): Fix up apps/shared usage (#22457)
Final clean up.

- Share `isObject()` function
- Clean up directory structure
- Use `Error.cause` for TS hint error
2026-05-20 08:21:39 +00:00
leaysgur 1a752eab42 refactor(oxfmt): Use shared/loadViteConfigField (#22455)
Move `loadViteConfigField()` from Oxfmt to shared.
2026-05-20 08:21:38 +00:00
leaysgur dcc6d38330 refactor(oxlint,oxfmt): Use shared/importJsConfig for js config (#22453)
Consolidate the following parts:

- Using native `import()`s
- Specifying `cacheKey`
- Extracting default exports
- Returning hints for TS incompatibility errors
2026-05-18 08:05:48 +00:00
leaysgur 37d49fcd40 refactor(oxlint,oxfmt): Share src-js code via apps/shared (#22452)
New place to share code for use in `src-js`, similar to how `crates/oxc_config` works.

Initially, I considered creating an `apps/oxc_cli` and moving `crates/oxc_config` there. However, it felt unnatural deps for `crates/oxc_linter` -> `apps/oxc_cli`, so I decided to keep the Rust code as is for now and share only the JS code.

Since `apps/shared` exports `.ts` files directly, each app is responsible for bundling them via `@oxapps/shared`. Tests still live in `apps/shared`, so separate CI is also added and hooked by each app.

To start, I've only shared the function that reports TS incompatibility errors. This is just for verification purposes and will be fixed in a later PR.
2026-05-18 07:56:26 +00:00