Keep stylesheet quality consistent across extension surfaces and catch CSS issues early. Stylelint runs through scripts or continuous integration (CI), not through the Extension.js dev/build pipeline.Documentation Index
Fetch the complete documentation index at: https://extension.js.org/llms.txt
Use this file to discover all available pages before exploring further.
When Stylelint is a good fit
- You maintain shared CSS/Sass/Less across multiple extension surfaces.
- You want style-quality checks before pull requests merge.
- You need consistent stylesheet conventions in team workflows.
Stylelint capabilities
| 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 |
Template examples
Stylelint configuration template
Preconfigured setup for style linting.
Usage with an existing extension
Install Stylelint dependencies:Stylelint configuration
Create a Stylelint configuration file at the project root (for example,.stylelintrc.json):
Run Stylelint
Integration with Prettier
Integrate Stylelint with Prettier to format and lint your styles together. Install the following dependencies: Then, update your.stylelintrc.json file to include Prettier:
Best practices
- Keep a dedicated
lint:stylescommand and run it in CI. - Use one shared configuration across extension packages in monorepos.
- Pair Stylelint and Prettier so style formatting stays deterministic.

