diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f9cdfc7..d2fd482 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,18 +30,6 @@ jobs: - name: Run Gitleaks run: nix develop --command just gitleaks - typos: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - - name: Setup Nix - uses: ./.github/actions/setup-nix - - - name: Run Typo Check - run: nix develop --command just typos - ci: runs-on: ubuntu-latest strategy: diff --git a/flake.lock b/flake.lock index 3396f08..6efbeea 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1765464257, - "narHash": "sha256-dixPWKiHzh80PtD0aLuxYNQ0xP+843dfXG/yM3OzaYQ=", + "lastModified": 1765911976, + "narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "09e45f2598e1a8499c3594fe11ec2943f34fe509", + "rev": "b68b780b69702a090c8bb1b973bab13756cc7a27", "type": "github" }, "original": { @@ -108,11 +108,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1765772535, - "narHash": "sha256-aq+dQoaPONOSjtFIBnAXseDm9TUhIbe215TPmkfMYww=", + "lastModified": 1766314097, + "narHash": "sha256-laJftWbghBehazn/zxVJ8NdENVgjccsWAdAqKXhErrM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "09b8fda8959d761445f12b55f380d90375a1d6bb", + "rev": "306ea70f9eb0fb4e040f8540e2deab32ed7e2055", "type": "github" }, "original": { @@ -151,11 +151,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1762938485, - "narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=", + "lastModified": 1766000401, + "narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4", + "rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5dd5f9f..ae98e67 100644 --- a/flake.nix +++ b/flake.nix @@ -42,19 +42,26 @@ nixfmt.package = pkgs.nixfmt-rfc-style; ruff-check.enable = true; ruff-format.enable = true; - prettier = { - enable = true; - includes = [ - "*.md" - "*.yml" - "*.yaml" - "*.json" - ]; - excludes = [ - "CHANGELOG.md" - ]; - }; typos.enable = true; + typos.configFile = "typos.toml"; + }; + settings.formatter.oxfmt = { + command = "${pkgs.oxfmt}/bin/oxfmt"; + includes = [ + "*.md" + "*.yml" + "*.yaml" + "*.json" + "*.ts" + "*.tsx" + "*.js" + "*.jsx" + "*.html" + "*.css" + ]; + excludes = [ + "CHANGELOG.md" + ]; }; }; diff --git a/justfile b/justfile index f5272bc..f0e40c5 100644 --- a/justfile +++ b/justfile @@ -2,13 +2,13 @@ install *extras: uv sync {{ extras }} -# Run ruff linting +# Run linting and format check (ruff, typos, nixfmt, oxfmt) lint: - uv run ruff check . + nix fmt -- --fail-on-change -# Auto-fix linting issues -lint-fix: - uv run ruff check --fix . +# Format and auto-fix linting issues +format: + nix fmt # Run all tests test: @@ -30,18 +30,10 @@ test-examples: ty: uv run ty check stackone_ai -# Run typos spell checker -typos: - typos --config typos.toml . - # Run gitleaks secret detection gitleaks: gitleaks detect --source . --config .gitleaks.toml -# Fix typos -typos-fix: - typos --config typos.toml --write-changes . - # Update version in __init__.py update-version: uv run scripts/update_version.py