Skip to content
On this page



  1. Make sure stylelint and related plugins for your stylelintrc are installed as peer dependencies.


    (Optional but highly recommended) Install meow@^9.0.0 with your package manager. It's needed because of Stylelint dependents on it. It's probably working fine even it's not installed as it's accessed as a phantom dependency. But when you set hoist=false of pnpm. It won't be accessible anymore without explicit installation.

  2. Add stylelint field to plugin config and options.stylelint.lintCommand is required. The lintCommand is the same as the lint command of your project. The default root of the command uses Vite's root.


    Do not add --fix to the lint command since the plugin is only aiming at check issues.

    // e.g.
    export default {
      plugins: [
          stylelint: {
            // for example, lint .css and .vue
            lintCommand: 'stylelint ./src/**/*.{css,vue}',


Advanced object configuration table of options.stylelint

fieldTypeDefault valueDescription
lintCommandstringThis value is requiredlintCommand will be executed at build mode, and will also be used as default config for dev mode when is nullable.
dev.overrideConfigStylelint.LinterOptionsundefined(Only in dev mode) You can override the options of the translated from lintCommand. Config priority: stylelint.lint({ cwd: root, ...translatedOptions,, }).
dev.logLevel('error' | 'warning')[]['error', 'warning'](Only in dev mode) Which level of Stylelint should be emitted to terminal and overlay in dev mode

Released under the MIT License.