oxlint, oxfmt: fix tsgolint dependency

tsgolint provides type-aware linting for oxlint, so it should be
a dependency of oxlint, not oxfmt. This commit:

- Removes tsgolint from oxfmt (formatter doesn't need type-aware linting)
- Adds tsgolint to oxlint via PATH wrapper
This commit is contained in:
ryoppippi
2026-01-11 18:01:41 +00:00
parent e5cb718166
commit 876476727d
2 changed files with 11 additions and 3 deletions
-2
View File
@@ -14,7 +14,6 @@
rustc,
versionCheckHook,
nix-update-script,
tsgolint,
}:
# Build with pnpm instead of buildRustPackage because Prettier integration
@@ -90,7 +89,6 @@ stdenv.mkDerivation (finalAttrs: {
cp npm/oxfmt/configuration_schema.json $outPath/
makeWrapper ${lib.getExe nodejs-slim} $out/bin/oxfmt \
--prefix PATH : "${lib.makeBinPath [ tsgolint ]}" \
--add-flags $outPath/dist/cli.js
runHook postInstall
+11 -1
View File
@@ -3,8 +3,10 @@
rustPlatform,
fetchFromGitHub,
cmake,
makeBinaryWrapper,
nix-update-script,
rust-jemalloc-sys,
tsgolint,
versionCheckHook,
}:
@@ -21,7 +23,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-cesj9jwWHIFxpFV62QDgYl22EUE8qVjIbb2nRObAyLo=";
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
makeBinaryWrapper
];
buildInputs = [
rust-jemalloc-sys
];
@@ -33,6 +38,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
];
cargoTestFlags = finalAttrs.cargoBuildFlags;
postFixup = ''
wrapProgram $out/bin/oxlint \
--prefix PATH : "${lib.makeBinPath [ tsgolint ]}"
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;