chore: add stylelint CSS linting and CI workflow#4
Merged
Conversation
Agent-Logs-Url: https://github.com/wintermuted/ui-theme/sessions/68135286-d637-4f78-aa97-9a4dfd7d0a75 Co-authored-by: wintermuted <2337325+wintermuted@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
wintermuted
May 4, 2026 19:20
View session
There was a problem hiding this comment.
Pull request overview
This PR introduces CSS linting to the theme package via Stylelint (standard config) and adds CI enforcement, while also reformatting existing CSS to satisfy the new lint rules.
Changes:
- Add Stylelint +
stylelint-config-standardand anpm run lintscript. - Add a GitHub Actions workflow to run CSS linting on
mainpushes and pull requests. - Auto-fix/normalize existing CSS across tokens and component styles (e.g., modern color notation,
@import url(), media query notation).
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| styles/tokens.css | Normalizes token values (hex shorthand, modern rgb() with alpha). |
| styles/components/tab-bar.css | Updates color notation to satisfy Stylelint rules. |
| styles/components/modal.css | Updates shadow color notation to satisfy Stylelint rules. |
| styles/components/layout.css | Updates responsive media query notation. |
| styles/components/checkbox-filter.css | Updates color notation to satisfy Stylelint rules. |
| styles/components.css | Converts component imports to @import url() form. |
| styles/base.css | Normalizes gradients/font-family formatting; changes text-size-adjust usage. |
| package.json | Adds lint script and Stylelint dev dependencies. |
| package-lock.json | Adds lockfile capturing Stylelint dependency tree. |
| index.css | Converts imports to @import url() form. |
| .stylelintrc.json | Adds Stylelint configuration (standard + custom property prefix rule). |
| .github/workflows/lint.yml | Adds CI workflow to run the new lint script. |
| @@ -8,7 +8,7 @@ | |||
|
|
|||
| html { | |||
| font-size: 16px; | |||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install --no-audit --no-fund |
Comment on lines
57
to
+62
| "scripts": { | ||
| "showcase:serve": "python3 -m http.server 4174", | ||
| "link:local": "bash scripts/link-local.sh", | ||
| "unlink:local": "bash scripts/unlink-local.sh" | ||
| "unlink:local": "bash scripts/unlink-local.sh", | ||
| "lint": "stylelint \"styles/**/*.css\" \"index.css\"" | ||
| }, |
Comment on lines
+63
to
66
| "devDependencies": { | ||
| "stylelint": "^17.10.0", | ||
| "stylelint-config-standard": "^40.0.0" | ||
| } |
| { | ||
| "extends": ["stylelint-config-standard"], | ||
| "rules": { | ||
| "custom-property-pattern": "^wm-", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds CSS linting to the project using Stylelint with the standard config, and wires it into a GitHub Actions workflow.
Changes
stylelint+stylelint-config-standardinstalled as dev dependencies.stylelintrc.json– extendsstylelint-config-standard; enforces thewm-prefix pattern for custom properties and leaves class-name patterns unchecked (no JS class-name conventions needed)package.json– newlintscript:stylelint "styles/**/*.css" "index.css".github/workflows/lint.yml– runsnpm run linton every push tomainand on all pull requestsrgb()/color()notation, correct@import url()syntax, hex shorthand, font-family quote conventions, etc.)