Skip to content

fix: code quality — remove unused deps, enforce clippy::pedantic, consolidate historical docs - #1238

Merged
Hexstar-labs merged 2 commits into
BrainTease:mainfrom
marvel6828:fix/code-quality-1198-1199-1200
Sep 28, 2026
Merged

Hexstar-labs merged 2 commits into
BrainTease:mainfrom
marvel6828:fix/code-quality-1198-1199-1200

Conversation

@marvel6828

@marvel6828 marvel6828 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1200, #1199, #1198

Summary

Three code quality improvements in a single PR.


#1200 — Remove unused npm dependencies

packages/types

  • Remove @types/jest devDependency — redundant with ts-jest 29 which bundles jest types via its preset; never directly imported in source files

apps/backend

  • Remove @eslint/js devDependency — not referenced in .eslintrc.js or any source file (uses eslint-plugin-* extends, not @eslint/js)
  • Remove @nestjs/apollo devDependency — never imported anywhere; the GraphQL module uses @nestjs/graphql directly

All other depcheck flags verified as false-positives (storybook addons referenced as strings in config, tailwindcss used via CSS pipeline, @vitest/coverage-v8 used as provider = 'v8' string, etc.)


#1199 — Enforce clippy::pedantic selectively across contracts workspace

Cargo.toml

  • Add [workspace.lints.clippy] table with 26 selected pedantic lints at warn level
  • Each lint is annotated with a rationale comment
  • Skipped lints documented with reasons: missing_errors_doc, missing_panics_doc, module_name_repetitions (ABI-breaking rename), must_use_candidate, wildcard_imports (idiomatic for soroban_sdk), cast_possible_truncation (required for SDK TTL/timestamp APIs), etc.

All 19 contracts/*/Cargo.toml files

  • Add [lints] workspace = true so every contract crate inherits the workspace lint table without per-crate duplication

clippy.toml

  • Retain msrv = "1.70.0"
  • Add pointer comment directing to Cargo.toml for the full lint list

#1198 — Consolidate scattered historical docs

  • Move 9 root-level files (IMPLEMENTATION_SUMMARY*.md, PR_DESC*.md, PR_DESCRIPTION*.md) to docs/history/
  • Add docs/history/README.md as a table-of-contents index for the moved files
  • Update docs/README.md with a new "Historical Artifacts" section linking to docs/history/
  • Confirmed zero CI workflow, docs, or source references to the moved files (grep across .yml, .md, .json, .ts, .js returned no matches)

Checklist

  • Zero unused deps reported per workspace (depcheck verified)
  • Selected pedantic lints enabled in [workspace.lints.clippy]
  • All 19 contract crates inherit lints via workspace = true
  • Repo root no longer cluttered with historical summary files
  • No broken references (grep confirmed)
  • docs/history/README.md index added

closes #1200
closes #1199
closes #1198

…pedantic, consolidate historical docs

Resolves BrainTease#1200, BrainTease#1199, BrainTease#1198

## BrainTease#1200 — Remove unused npm dependencies

packages/types:
- Remove `@types/jest` devDependency (redundant: ts-jest 29 provides jest
  types via its preset; `@types/jest` was never explicitly imported)

apps/backend:
- Remove `@eslint/js` devDependency (not referenced in .eslintrc.js or any
  source file; the project uses eslint-plugin-* and extends, not @eslint/js)
- Remove `@nestjs/apollo` devDependency (GraphQL module uses @nestjs/graphql
  directly; @nestjs/apollo is never imported anywhere in src/)

Retained after review (depcheck false-positives):
- tailwindcss — used via tailwind.config.js + Next.js CSS pipeline
- @chromatic-com/storybook, @storybook/addon-* — used as strings in
  .storybook/main.ts addons array (depcheck can't detect string references)
- @vitest/coverage-v8 — used as provider = 'v8' string in vitest.config.ts
- compression / @types/compression — imported in apps/backend/src/main.ts
- @faker-js/faker — used in apps/backend/src/test/factories/
- testcontainers / tsconfig-paths — used in integration tests and seed scripts

## BrainTease#1199 — Enforce clippy::pedantic selectively across contracts workspace

Cargo.toml:
- Add [workspace.lints.clippy] table with 26 selected pedantic lints (warn
  level) that catch real correctness issues in #![no_std] Soroban contracts
- Each enabled lint is annotated with a rationale comment
- Lints skipped (with documented reasons): missing_errors_doc,
  missing_panics_doc, module_name_repetitions, must_use_candidate,
  wildcard_imports, too_many_lines, struct_excessive_bools,
  cast_possible_truncation, cast_sign_loss, cast_precision_loss

contracts/*/Cargo.toml (all 19 contracts):
- Add [lints] workspace = true so every contract crate inherits the
  workspace lint table without per-crate duplication

clippy.toml:
- Retain msrv = "1.70.0"
- Add pointer comment directing readers to Cargo.toml for the lint list

## BrainTease#1198 — Consolidate scattered historical docs

- Move 9 root-level IMPLEMENTATION_SUMMARY*.md and PR_DESC*.md files to
  docs/history/ (they are historical artifacts from issues BrainTease#626–BrainTease#841)
- Add docs/history/README.md with a table-of-contents for the moved files
- Update docs/README.md to reference the new docs/history/ section
- Confirmed zero CI workflow, docs, or source references to these files
  (grep across .yml, .md, .json, .ts, .js returned no matches)
@drips-wave

drips-wave Bot commented Sep 26, 2026

Copy link
Copy Markdown

@marvel6828 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Hexstar-labs
Hexstar-labs merged commit 5db88ad into BrainTease:main Sep 28, 2026
18 of 45 checks passed

This branch had an error being deployed

1 failed deployment
preview-pr-1238 — 60b3ddec Deployed Sep 28, 2026 by Hexstar-labs via Deploy Preview Environment #239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants