Skip to content

feat(linter): allow project component sub-tokens - #176

Open
Arshgill01 wants to merge 1 commit into
google-labs-code:mainfrom
Arshgill01:feat/configurable-component-sub-tokens
Open

feat(linter): allow project component sub-tokens#176
Arshgill01 wants to merge 1 commit into
google-labs-code:mainfrom
Arshgill01:feat/configurable-component-sub-tokens

Conversation

@Arshgill01

Copy link
Copy Markdown
Contributor

Fixes #171.

Problem

Custom component sub-tokens survive parsing and reference resolution, but broken-ref warns for every occurrence. Expected extension warnings then hide real misspellings such as gaap among declared keys such as gap and owner. Disabling broken-ref is too broad because it also disables unresolved-reference errors.

Solution

  • add per-rule options to the lint runner and public lint API
  • let broken-ref accept additionalComponentSubTokens and union them with the built-in vocabulary
  • preserve default behavior, typo warnings, and unresolved-reference errors
  • export the option and descriptor types and document the programmatic API

Validation

  • npx --yes bun@1.3.9 test: 348 passed, 1 optional DTCG conformance test skipped, 0 failed
  • npm run lint --workspace=@google/design.md: passed
  • npx --yes bun@1.3.9 run build: passed
  • npx --yes bun@1.3.9 run packages/cli/scripts/check-package.ts: 25/25 passed
  • packed-artifact E2E in a clean temp project: baseline warned for gap, owner, and gaap; configured lint warned only for gaap

@Arshgill01

Copy link
Copy Markdown
Contributor Author

Status / unblock ask

mergeable_state is UNSTABLE because the Test workflow (and the Google Actions Workflow Security Scan) are stuck in action_required for this fork PR — they never ran lint/test/build.

  • CLA: pass
  • GitHub Actions Scan (pull_request_target): pass
  • Conflicts: none (MERGEABLE, rebaseable: true)

Could a maintainer Approve and run workflows on https://github.com/google-labs-code/design.md/actions/runs/33332070373 so Test goes green? Happy to rebase onto latest main and re-request review once CI is allowed to run.

Fixes #171.

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.

No way to declare intentional component sub-tokens, so every recipe warns

1 participant