Nexgit treats linting, formatting, and editor/LSP setup as required project infrastructure.
The goal is to make contributions easier to review and reduce style debates.
Tool versions are provided through the two supported development environment entrypoints:
mise.tomlflake.nix
Choose one setup path from Development environments, then run the tooling commands below.
Rust is formatted with rustfmt:
cargo fmt --allMarkdown, JSON, CSS, TypeScript, and TSX are formatted with Prettier:
pnpm format:prettierFormat everything:
pnpm formatCheck formatting without writing changes:
pnpm format:checkFormatting config:
.editorconfig
.prettierrc.json
.prettierignore
rust-toolchain.toml
rustfmt.toml
flake.nix
Nix files are formatted through the flake formatter:
pnpm nix:fmt
pnpm nix:fmt:checkRust linting uses Clippy with warnings denied:
pnpm lint:rustDesktop linting uses ESLint flat config with TypeScript-aware rules:
pnpm lint:desktopRun all linting:
pnpm lintESLint config:
apps/desktop/eslint.config.mjs
Desktop TypeScript type checking:
pnpm typecheckRust workspace checking:
cargo check --workspaceBefore opening a pull request, run:
pnpm checkIf you changed Nix files, also run:
pnpm nix:check
pnpm nix:fmt:checkThis runs:
- Rust format check.
- Prettier check.
- Rust workspace check.
- Rust Clippy.
- Desktop ESLint.
- Desktop TypeScript check.
For docs-only changes, this is usually enough:
pnpm format:check
git diff --checkThe repo includes recommended editor files:
.vscode/extensions.json
.vscode/settings.json
Recommended extensions:
- rust-analyzer
- Even Better TOML
- Nix IDE
- ESLint
- Prettier
- EditorConfig
The settings enable:
- format on save
- Prettier for web/docs files
- rust-analyzer formatting for Rust
- ESLint fixes on save when explicitly requested
- rust-analyzer Clippy checks
Use the equivalent language servers:
- Rust:
rust-analyzer - Nix:
nixd - TypeScript/React: TypeScript language server
- ESLint: ESLint language server
- Formatting: Prettier, rustfmt, and nixfmt
GitHub Actions are defined in:
.github/workflows/check.yml
CI checks the Nix flake, Nix formatting, Rust formatting, Rust compile/lint, Prettier formatting, desktop ESLint, desktop TypeScript, and desktop build.