Keep stylesheet quality consistent across extension surfaces and catch CSS issues early. Stylelint runs through scripts or CI, not through the Extension.js dev/build pipeline.
| Capability | What it gives you |
|---|---|
| CSS quality checks | Catch invalid patterns and enforce style conventions |
| Preprocessor support | Lint CSS, Sass, and Less in one workflow |
| Script and CI integration | Run style checks before merge and release |
| Formatter alignment | Combine with Prettier to reduce style-tool conflicts |
Preconfigured setup for style linting.

Repository: examples/new-config-stylelint
Install Stylelint dependencies:
Create a Stylelint config file at the project root (for example .stylelintrc.json):
If you do not have a script yet:
You can integrate Stylelint with Prettier to automatically format and lint your styles. To do this, install the following dependencies:
Then, update your .stylelintrc.json file to include Prettier:
This keeps style formatting and linting concerns aligned.
lint:styles command and run it in CI.Extension.js can detect Stylelint config files for diagnostics/reporting, but it does not inject Stylelint into the build pipeline.