Skip to content

chore: add stylelint CSS linting and CI workflow#4

Merged
wintermuted merged 1 commit into
mainfrom
copilot/add-linting-to-project
May 4, 2026
Merged

chore: add stylelint CSS linting and CI workflow#4
wintermuted merged 1 commit into
mainfrom
copilot/add-linting-to-project

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

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-standard installed as dev dependencies
  • .stylelintrc.json – extends stylelint-config-standard; enforces the wm- prefix pattern for custom properties and leaves class-name patterns unchecked (no JS class-name conventions needed)
  • package.json – new lint script: stylelint "styles/**/*.css" "index.css"
  • .github/workflows/lint.yml – runs npm run lint on every push to main and on all pull requests
  • All 55 pre-existing CSS issues auto-fixed (modern rgb()/color() notation, correct @import url() syntax, hex shorthand, font-family quote conventions, etc.)

Copilot AI requested a review from wintermuted May 4, 2026 19:20
@wintermuted wintermuted marked this pull request as ready for review May 4, 2026 19:53
Copilot AI review requested due to automatic review settings May 4, 2026 19:53
@wintermuted wintermuted merged commit aa1ab2e into main May 4, 2026
1 check passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-standard and a npm run lint script.
  • Add a GitHub Actions workflow to run CSS linting on main pushes 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.

Comment thread styles/base.css
@@ -8,7 +8,7 @@

html {
font-size: 16px;
cache: npm

- name: Install dependencies
run: npm install --no-audit --no-fund
Comment thread package.json
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 thread package.json
Comment on lines +63 to 66
"devDependencies": {
"stylelint": "^17.10.0",
"stylelint-config-standard": "^40.0.0"
}
Comment thread .stylelintrc.json
{
"extends": ["stylelint-config-standard"],
"rules": {
"custom-property-pattern": "^wm-",
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.

3 participants