Skip to content

Commit a47cb9a

Browse files
committed
fix(tools): fix just oxlint and just watch-oxlint (#14036)
Fix `just oxlint` and `just watch-oxlint`. They were broken because `oxlint` is now a NAPI package. Remove `cargo oxlint` command, because `oxlint` needs to be built with NAPI-RS now.
1 parent 601c876 commit a47cb9a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.cargo/config.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ allocs = "run -p oxc_track_memory_allocations --profile coverage --"
1111
rule = "run -p rulegen"
1212
lintgen = "run -p oxc_linter_codegen"
1313

14-
# Build oxlint in release mode
15-
oxlint = "build --release -p oxlint --bin oxlint --features allocator"
16-
1714
# Fix napi breaking in test environment <https://github.com/napi-rs/napi-rs/issues/1005#issuecomment-1011034770>
1815
# To be able to run unit tests on macOS, support compilation to 'x86_64-apple-darwin'.
1916
[target.'cfg(target_vendor = "apple")']

justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ ast:
140140

141141
# Build oxlint in release build
142142
oxlint:
143-
cargo oxlint
143+
pnpm -C apps/oxlint run build
144144

145145
watch-oxlint *args='':
146-
just watch 'cargo run -p oxlint -- --disable-nested-config {{args}}'
146+
just watch 'node apps/oxlint/dist/cli.js --disable-nested-config {{args}}'
147147

148148
# Create a new lint rule for any plugin
149149
new-rule name plugin='eslint':
@@ -245,4 +245,4 @@ clone-submodule dir url sha:
245245
clone-submodule dir url sha:
246246
if (-not (Test-Path {{dir}}/.git)) { git init {{dir}} }
247247
cd {{dir}} ; if ((git remote) -notcontains 'origin') { git remote add origin {{url}} } else { git remote set-url origin {{url}} }
248-
cd {{dir}} ; git fetch --depth=1 origin {{sha}} ; git reset --hard {{sha}} ; git clean -f -q
248+
cd {{dir}} ; git fetch --depth=1 origin {{sha}} ; git reset --hard {{sha}} ; git clean -f -q

0 commit comments

Comments
 (0)