mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 09:45:13 +00:00
## Summary Adds [stylelint](https://stylelint.io/) configuration and tooling to enforce CSS/SCSS code quality and consistency across Vue components. Starts with 21 focused rules for linting CSS in Vue SFC files and standalone stylesheets. Configuration uses postcss-html to parse Vue `<style>` blocks and includes whitelists for Tailwind v4 at-rules (`@reference`, `@plugin`, `@custom-variant`, `@utility`) and Electron-specific CSS properties (`speak: none`, `app-region`). Rules emphasize modern CSS syntax (numeric font weights, modern color functions, double-colon pseudo-elements) while avoiding overly opinionated rules like hex color length enforcement (for now). Currently finds 113 issues (79% auto-fixable). This PR only adds the tooling via `pnpm stylelint` and `pnpm stylelint:fix` scripts - no pre-commit hooks or CI integration yet. A follow-up PR will auto-fix the fixable issues and optionally add enforcement to the commit workflow. ## Changes - **What**: Integrated [stylelint](https://stylelint.io/) with Vue.js support via postcss-html parser - **Dependencies**: Added `stylelint@16.24.0`, `postcss-html@1.8.0` ## Review Focus CSS rule strictness and Tailwind CSS compatibility - particularly the `no-descending-specificity` rule and Tailwind-specific function ignores. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5926-ci-add-stylelint-dependency-and-minimal-config-2836d73d3650813ea7b7eb714ba7748a) by [Unito](https://www.unito.io)
1.4 KiB
1.4 KiB