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 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:.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.

