Skip to content

feat(analyze): report hardcoded theme tokens - #52

Open
lntutor wants to merge 7 commits into
askrjs:mainfrom
lntutor:fix/48-hardcoded-theme-token-rule
Open

feat(analyze): report hardcoded theme tokens#52
lntutor wants to merge 7 commits into
askrjs:mainfrom
lntutor:fix/48-hardcoded-theme-token-rule

Conversation

@lntutor

@lntutor lntutor commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • add askr/no-hardcoded-theme-token for direct --ak-* literals in runtime JavaScript and TypeScript
  • inspect strings, template segments, and JSX attributes while respecting configured source exclusions
  • exempt only the exact @askrjs/themes token-owner workspace and document the rule
  • move existing SSR and StartKit template token references into CSS so generated projects pass the new rule

Verification

  • npm test (203 tests)
  • npm run check
  • npm run test:templates (all five templates, zero analyzer warnings)
  • git diff --check origin/main...HEAD

Closes #48

@lntutor
lntutor requested a review from smiggleworth as a code owner July 30, 2026 15:50
@lntutor
lntutor force-pushed the fix/48-hardcoded-theme-token-rule branch from 92e9ff6 to c62aa1d Compare July 30, 2026 23:32
@lntutor

lntutor commented Jul 30, 2026

Copy link
Copy Markdown
Author

Rebased onto current main and resolved the analyzer overlap introduced by #58: the existing askr/no-hardcoded-theme-token rule now preserves upstream hardcoded-color diagnostics while also detecting the issue #48 --ak-* literals, without duplicate rule registration. Fresh npm run check passes, including lint, typecheck, 204 tests with coverage, build, publint, and package dry-run.

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.

analyze: report hardcoded --ak-* theme tokens in runtime TS/JS

1 participant