Skip to content

Conversation

@jubalm
Copy link
Collaborator

@jubalm jubalm commented Jan 20, 2026

Summary

Updates package dependencies and implements comprehensive linter fixes alongside the Tailwind v4 validator skill.

  • Updates to package-lock.json marking peer dependencies
  • Implements Tailwind v4 canonical validator agent skill with auto-fixing PostToolUse hook
  • Comprehensive linter resolution: reduces errors from 34 → 17 (50% reduction), warnings from 297 → 175

Changes

Lint Configuration

  • Add biome.json with Astro file overrides to prevent false positives on unused variables/imports in frontmatter
  • Configures noUnusedVariables and noUnusedImports as warnings globally, disabled for .astro files

Code Fixes

  • Node.js imports: Add node: protocol prefix to builtin imports (fs, path)
  • Exponentiation: Replace Math.pow() with ** operator for modern, concise syntax
  • Accessibility: Add explicit type="button" attributes to button elements
  • Type safety: Replace any types with specific type annotations
  • Error handling: Remove non-null assertions in favor of optional chaining and null checks
  • Loop patterns: Refactor assignment-in-expression pattern in while loops
  • Unused variables: Fix with underscore prefix where appropriate
  • Comments cleanup: Remove biome-ignore suppressions from Astro components (now handled by biome.json overrides)

Files Modified

  • 15 files across .claude/, scripts/, and src/components/
  • New configuration: biome.json

Test Plan

  • Run npm run lint - verify error and warning reduction
  • Run npm run typecheck - verify type safety
  • Run npm run build - verify build success
  • Verify Astro files no longer show false positive unused variable warnings

…g hook

Implement comprehensive Tailwind v4 validator system with:
- Agent skill for detecting non-canonical Tailwind v4 syntax patterns
- 15 pattern validations covering arbitrary values, utility variations
- Auto-fixing PostToolUse hook for direct code corrections
- Test suite with comprehensive coverage
- Full documentation and integration guide

Addresses the need for canonical Tailwind v4 CSS-first validation
in projects using @theme/@Utility directives.
…coverage

- Add shadow-default pattern for bare shadow utility changes (Priority 1)
- Add backdrop-blur-scale pattern for consistency with blur utilities (Priority 1)
- Add box-decoration-clone semantic rename pattern (Priority 3)
- Expanded patterns.json from 15 to 18 rules based on official Tailwind docs
- Update SKILL.md quick reference to document shadow scale changes clearly
- Database now covers all breaking changes from official upgrade guide
- Add biome.json with Astro file overrides to prevent false positives on unused variables/imports
- Fix Node.js builtin imports with node: protocol prefix (fs, path)
- Replace Math.pow() with ** operator for exponentiation
- Add explicit type: "button" attributes for accessibility
- Remove non-null assertions in favor of optional chaining and null checks
- Replace assignment-in-expression pattern in while loops
- Refactor any types with specific type annotations
- Fix unused variables with underscore prefix where appropriate
- Remove biome-ignore comments from Astro components (handled by biome.json)

Reduces errors from 34 to 17 (50% reduction) and warnings from 297 to 175.
@jubalm jubalm changed the title chore: update agent skills and dependencies chore: improve code quality - update agent skills and resolve linter violations Jan 20, 2026
jubalm added 15 commits January 20, 2026 17:06
…ation

- Replace arbitrary Tailwind values with standardized utilities
- Change tracking-[0.1em] to tracking-widest for consistent letter-spacing
- Update size: prefix syntax from size:clamp() to clamp()
- Replace h-[1px] with h-px for hairline borders
- Replace flex-shrink-0 with modern shrink-0 utility
- Change max-w-screen-xl to max-w-7xl for consistency
- Fix whitespace and formatting issues in .astro and .tsx files
- Removes 8 additional linter warnings from component files
…figuration

- Enable Biome VCS integration to respect .gitignore (excludes dist, node_modules, .astro, public)
- Disable unused variable/import checks for .astro files (frontmatter false positives)
- Remove composite project references from tsconfig to fix Astro virtual module resolution
- Resolves thousands of false positive linting errors and astro:content type issues
- Update RiskLevel type definition: 'none' | 'low' | 'moderate' | 'high' | 'critical' | 'unknown'
- Align with documentation thresholds: none (0%), low (<10%), moderate (10-25%), high (25-75%), critical (≥75%)
- Add explicit 'none' state for zero-dispute scenarios (distinct from 'unknown' RPC failure state)
- Consistent implementation across script, frontend types, and demo data generation
- Addresses type mismatches between calculate-fork-risk.ts and frontend definitions
- Document two approaches for RPC failure handling:
  * Option A: Show stale data (recommended for UX transparency)
  * Option B: Show as "No Risk" (current, simpler but potentially misleading)
- Deferred pending user feedback on acceptable staleness thresholds
- Current implementation uses Option B; can be revisited with stakeholder input
- Remove duplicate CSS background-size property
- Add Tailwind directives support to Biome CSS parser
- Fix missing hook dependencies (useExhaustiveDependencies)
- Remove unnecessary dependencies from useCallbacks
- Convert to template literal for string concatenation
- Prefix unused variables and parameters with underscore
- Replace any types with proper TypeScript types
- Move useEffect before conditional returns (ForkControls)
- Use useCallback to prevent function recreation on each render
- Add accessibility attributes to SVGs (aria-hidden, aria-label)
- Add biome-ignore comment for false positive WebGL hook warning

Reduces errors from 17 to 0. Maintains 166 warnings (mostly informational).
The _getWorkingProvider function was superseded by executeWithRpcFallback,
which provides more comprehensive RPC endpoint handling including contract
loading and operation execution in a single function.
- Add 'unknown' to RiskLevel type in calculate-fork-risk.ts to match usage in getErrorResult
- Remove unused currentTitle parameter from LearnNavigation destructuring
- Aligns script types with frontend types and frontend usage
ForkDisplay now uses real data from useForkData hook and no longer
needs the animated prop. Removed the prop and ForkDisplayProps interface
for a cleaner, simpler component signature.
Explicitly reference the global window object for setTimeout to avoid
potential scope confusion and improve code clarity in Astro components.
- Remove public/cache/event-cache.json from version control
- Add public/cache/ to .gitignore to prevent future commits
- Generated runtime cache files should never be tracked in git
- Rename to "Fork Risk System Architecture Decisions"
- Document cache persistence problem and its impact on RPC reduction
- Propose dual-job workflow architecture:
  * Daily Cache Guardian (ensures cache persistence daily)
  * Risk Monitor (alerts on meaningful changes)
- Benefits: reliable incremental querying, no spam, clear separation of concerns
Skill should be self-documenting. Removed implementation plan as skill frontmatter provides sufficient guidance.
@jubalm jubalm merged commit 489cd73 into main Jan 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants