diff --git a/.husky/pre-commit b/.husky/pre-commit index f1f12b5..2312dc5 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -cargo clippy --all-targets --all-features -- -D warnings && cargo +nightly fmt && npx lint-staged +npx lint-staged diff --git a/flake.nix b/flake.nix index 554a6c8..3afb3c5 100644 --- a/flake.nix +++ b/flake.nix @@ -71,9 +71,9 @@ # We get your default shell to make sure things feel familiar in the dev shell. getUserShellCommand = if pkgs.stdenv.hostPlatform.isDarwin then - "dscl . -read ~ UserShell | cut -d ' ' -f2" + "dscl . -read ~ UserShell | cut -d ' ' -f2 | tr -d '\n'" else - "getent passwd $USER | cut -d ':' -f7"; + "getent passwd $USER | cut -d ':' -f7 | tr -d '\n'"; in { packages = { inherit all; @@ -98,6 +98,10 @@ devShells.ci = craneLib.devShell { LLVM_SYS_180_PREFIX = "${pkgs.lib.getDev pkgs.llvmPackages_18.libllvm}"; inputsFrom = lib.attrValues llvmToCairo; + + packages = [ + pkgs.nodejs_22 + ]; }; } ); diff --git a/package.json b/package.json index 43ebda2..03ea888 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,15 @@ "lint-staged": { "(*.md|*.toml|*.json|*.yaml|*.yml|*.css|*.js|*.ts)": [ "prettier --write" + ], + "*.rs": [ + "rustfmt --unstable-features --edition 2021", + "clippy-driver" ] }, "husky": { "hooks": { - "pre-commit": "npx lint-staged && cargo clippy -- -D warnings" + "pre-commit": "npx lint-staged" } }, "scripts": {