Stylelint is an AI agent skill from the GitHub repository managedcode/dotnet-skills. Use Stylelint in .NET repositories that ship CSS, SCSS, or other stylesheet assets alongside web frontends. USE FOR: stylelint.config.*, .stylelintrc*, CSS or SCSS assets; CSS linting; duplicate style cleanup and naming-convention checks. DO NOT USE FOR: JavaScript or TypeScript lint ownership; runt
Add syntax packages only when the repo needs them for SCSS or embedded styles.
Create or refine stylelint.config.js, stylelint.config.mjs, or the existing config format.
Add repeatable commands to AGENTS.md and package.json, then verify with:
npx stylelint "**/*.{css,scss}"
npx stylelint "**/*.{css,scss}" --fix
Return status: configured if Stylelint is now wired and repeatable, or status: improved if the existing baseline was tightened.
Return status: not_applicable only when another documented tool already owns stylesheet linting and migration is not requested.
Handle Failures
Unknown rule usually means the config expects a plugin or a different Stylelint major version.
Unknown word on SCSS, Vue, or mixed-content files usually means the repo needs the matching custom syntax package instead of plain CSS parsing.
Massive autofix churn usually means generated assets or third-party CSS slipped into the lint target.
Design-system rule noise should be handled by tuning the checked-in config, not by skipping the linter entirely.
Current 17.14 Guidance
Stylelint 17.14.1 fixes quiet suppressing report* warnings, unknown-rule diagnostic ranges, invalid background shorthand autofixes when background-size is present, and rule-empty-line-before false positives around shared-line comments. Re-run lint with and without --quiet, and inspect any background autofix diff before accepting it.
Stylelint 17.8.0 also added languageOptions.directionality, property-layout-mappings, relative-selector-nesting-notation, and selector-no-deprecated. Re-run the repo baseline after upgrading so any new selector or layout findings are reviewed instead of preserved by default.
Use languageOptions.directionality explicitly when the repo styles bidirectional UI or logical properties. That keeps direction-sensitive rules aligned with the intended writing direction rather than inferred behavior.
The earlier *syntax deprecation under declaration-property-value-no-unknown still matters on the 17.x line. If the repo still relies on those options, move the compatibility into customSyntax or parser selection instead of extending deprecated rule config.
Keep repo ignores focused on generated or vendored assets. Re-check any broad ignore globs after upgrading so they are not masking selector or layout regressions that the new rules now catch.
verification: commands, checks, or review evidence
remaining: unresolved items or none
Example Requests
"Add Stylelint for the SCSS in this ASP.NET Core app."
"Block duplicate selectors and invalid CSS in CI."
"Fix the current Stylelint violations without touching generated CSS."
References
release-notes.md - Current 17.14.1 and 17.8.0 release changes that matter for repo config, autofix review, rule tuning, and selector/layout validation
Use this skill with your AI agent:Open on Skill Issue to copy, download, or add to your library.
Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.