Skip to content

Developer Utility Scripts

Development on the Node wrapper involves various scripts for linting, formatting, and managing the development environment.

Terminal window
# Launch a TypeScript REPL for interactive testing
npm run repl
# Clean only build artifacts
npm run clean:build
# Complete cleanup including node_modules
npm run clean

Development on the Node wrapper may involve changes in either the TypeScript or Rust code. Each language has distinct linter tests that must be passed before committing changes.

Terminal window
# Run from the node folder
# Check code quality with ESLint
npm run lint
# Automatically fix linting issues
npm run lint:fix
# Check code formatting only
npm run prettier:check
# Format code automatically
npm run prettier:format
Terminal window
# Run from the `node/rust-client` folder
# Format all files (Rust and others)
npm run format
# Format only Rust files
npm run format:rs
# Format only non-Rust files with Prettier
npm run format:prettier
# Alternatively, use Rust tools directly:
rustup component add clippy rustfmt
cargo clippy --all-features --all-targets -- -D warnings
cargo fmt --manifest-path ./Cargo.toml --all