css
Style sheets and the style blocks of components: the standard stylelint rules, no left or right properties, a visible focus outline, and relative font sizes. SCSS gets formatting only. Guide: CSS.
Selected when
Section titled “Selected when”A scope has file extensions .css, .vue, .svelte, or .astro.
Checks
Section titled “Checks”stylelint
Section titled “stylelint”Lints every stylesheet with the standard stylelint rules, and refuses left and right properties and values, outline: none, and a font-size outside rem, em, and %.
Runs at the commit stage. gspot check --fix fixes what it can.
A browser silently skips a declaration it cannot parse, so a typo in a property ships as a missing style.
What to do
Section titled “What to do”Run the fix: command that the report prints for the rules that fix themselves.
Example
Section titled “Example”The declaration color: #ggg holds an invalid hex value and reports a finding. Replace it with a valid one such as #abc.
Turn it off
Section titled “Turn it off”gspot ignore css/stylelint --paths "<path>" --reason "<why>"gspot ignore css/stylelint --rule <rule> --reason "<why>"To silence one place, write a comment such as:
/* stylelint-disable-next-line declaration-no-important -- reason: the vendor widget sets its own color */Settings
Section titled “Settings”| Setting | What it sets |
|---|---|
tools.stylelint.rules |
Options for Stylelint rules, which stay errors. gspot refuses options for a rule of level all at a lower level, and Stylelint reports a rule that it does not know. Ignore a finding with gspot ignore css/stylelint --rule <rule> --reason "<why>". |
tools.stylelint.plugins |
Stylelint plugins of your own: a tracked .js or .mjs module as path or a pinned npm package as package and version, and the rules that turn on as errors. |
Rules for coding agents
Section titled “Rules for coding agents”| Rule file | Installed when |
|---|---|
.gspot/rules/CSS.md |
Always |
.gspot/rules/TAILWIND.md |
The repository has a dependency on tailwindcss. |
Tools and versions
Section titled “Tools and versions”| Tool | Version |
|---|---|
| stylelint | 17.16.0 |
| stylelint-config-standard | 40.0.0 |
| postcss-html | 2.0.0 |
Files gspot writes
Section titled “Files gspot writes”.stylelintrc.yml and .gspot/configurations/css/stylelint.json