Add stylelint for CSS not covered by Biome#265
Merged
Merged
Conversation
Biome formats standalone .css files but does not parse CSS embedded in HTML or Astro <style> blocks, so the popup/options styles and the docs component styles were unlinted. Add stylelint (config-standard) to each package that has CSS: - extension: lints the <style> blocks in src/popup.html and src/options.html via postcss-html. BEM class pattern and no-descending-specificity are disabled (component-grouped CSS). - demo-site: lints src/**/*.css, with stylelint-config-tailwindcss for Tailwind's at-rules. - docs: lints the scoped <style> in .astro components via postcss-html. Wired into each package's `check` script (so it runs in the existing CI jobs and `preflight`) plus pre-commit hooks for extension + demo-site, mirroring the ESLint local-hook pattern. Existing CSS auto-fixed to conform (blank lines between rules, modern color/media notation); the deprecated `clip` visually-hidden technique swapped for `clip-path`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Adds stylelint (extending
stylelint-config-standard) to lint CSS that Biome cannot reach. Biome formats standalone.cssfiles, but it does not parse CSS embedded in HTML or Astro<style>blocks — so the extension popup/options styles and the docs component styles were previously unlinted.Scope
extension<style>insrc/popup.html,src/options.htmlpostcss-html; BEM class pattern +no-descending-specificitydisabled (component-grouped CSS)demo-sitesrc/**/*.cssstylelint-config-tailwindcssso Tailwind's at-rules aren't flaggeddocs<style>in*.astropostcss-html;custom-property-patterndisabled (Starlight--sl-*tokens)Integration
checkscript, so it runs in the current CI jobs (extensionpreflight,demo-sitecheck,docscheck) — noci.ymlchanges needed.pre-commitlocal hooks forextension+demo-site, mirroring the existing ESLint local-hook pattern.docshas no pre-commit hook because the pre-commit CI job only installs extension + demo-site deps; docs CSS is covered by the docs CIcheck.stylelint.config.js(matching the per-package ESLint convention).Existing CSS changes (auto-fix)
Ran
--fixon the existing styles to conform toconfig-standard:rule-empty-line-before).rgb(0 0 0 / …),(width <= 50rem)).clip: rect(...)visually-hidden technique swapped forclip-path: inset(50%)(Chromium-only target, fully supported).Verification
bun run checkpasses in all three packages,knipstays clean (extension), and the new pre-commit stylelint hooks pass.🤖 Generated with Claude Code