Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add core linter #238

Merged
merged 2 commits into from
Mar 30, 2024
Merged

Add core linter #238

merged 2 commits into from
Mar 30, 2024

Conversation

drwpow
Copy link
Collaborator

@drwpow drwpow commented Mar 30, 2024

Changes

Part of #225

Adds a buncha new rules to @cobalt-ui/core out-of-the-box:

Rule Default Description
duplicate-values "warn" Enforce no tokens have duplicate values.
naming "off" Enforce all token names follow a specific style (e.g. kebab-case or camelCase)
required-children "off" Enforces matching groups have required children.
required-modes "off" Enforces matching tokens have required modes.
color/format "off" Enforce color tokens are declared in a certain format (e.g. oklch).
color/gamut "warn" Enforce color tokens are displayable within the specified gamut (srgb, p3, or rec2020).
typography/required-properties "off" Enforce typography tokens have specific properties (e.g. fontWeight).

Also adds a new Linting guide to take full advantage of these checks

How to Review

  • Tests added; tests should pass

Copy link

changeset-bot bot commented Mar 30, 2024

🦋 Changeset detected

Latest commit: 27f0715

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@cobalt-ui/utils Patch
@cobalt-ui/core Minor
@cobalt-ui/cli Minor
@cobalt-ui/plugin-css Major
@cobalt-ui/plugin-js Major
@cobalt-ui/plugin-sass Major
@cobalt-ui/plugin-tailwind Major
@cobalt-ui/lint-a11y Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

cloudflare-workers-and-pages bot commented Mar 30, 2024

Deploying cobalt-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 27f0715
Status: ✅  Deploy successful!
Preview URL: https://06d9d9b1.cobalt-ui.pages.dev
Branch Preview URL: https://lint-core.cobalt-ui.pages.dev

View logs

@drwpow drwpow force-pushed the lint-core branch 5 times, most recently from e96abfd to d0824f3 Compare March 30, 2024 21:17
@drwpow drwpow merged commit 4b02c6b into main Mar 30, 2024
10 checks passed
@drwpow drwpow deleted the lint-core branch March 30, 2024 21:22
@drwpow drwpow mentioned this pull request Mar 30, 2024
@github-actions github-actions bot mentioned this pull request Mar 30, 2024
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.

1 participant