Stylelint
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.
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
Template examples
Stylelint config template
Preconfigured setup for style linting.

Repository: examples/new-config-stylelint
Usage with an existing extension
Install Stylelint dependencies:
Stylelint configuration
Create a Stylelint config file at the project root (for example .stylelintrc.json):
Run Stylelint
If you do not have a script yet:
Integrating Stylelint with Prettier
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.
Best practices
- Keep a dedicated
lint:stylescommand and run it in CI. - Use one shared config across extension packages in monorepos.
- Pair Stylelint and Prettier so style formatting stays deterministic.
Detection notes
Extension.js can detect Stylelint config files for diagnostics/reporting, but it does not inject Stylelint into the build pipeline.
