ota-meshi/stylelint-config-standard-vue

The standard shareable Vue config for Stylelint.

27

stars

47

commits

JavaScript

primary language

Sep 7, 2026

updated

linter-config
stylelint
vue

README

stylelint-config-standard-vue

NPM license NPM version NPM downloads NPM downloads Build Status

The standard shareable Vue config for Stylelint.

This config:

Requirements

To see the rules that this config uses, please read the config itself.

:cd: Installation

npm install --save-dev postcss-html stylelint-config-html stylelint-config-recommended-vue stylelint-config-standard stylelint-config-standard-vue

The shared configs that this config extends (stylelint-config-html, stylelint-config-recommended-vue, and stylelint-config-standard) are peer dependencies, so you can control their versions from your own package.json.

:book: Usage

Set your stylelint config to:

{
    "extends": "stylelint-config-standard-vue"
}

Note: This config enables rules for only .vue files.

If you don't want the rules to be overridden (If you want to enable only the parser.), please use stylelint-config-html.

{
    "extends": "stylelint-config-html/vue"
}

Since this package configure customSyntax option to allow parsing Vue files, be sure it is the LAST item into the extends array, in case more than one configuration is applied. Not complying to this rule may result in broken Vue files parsing, generating confusing errors like Unknown word (CssSyntaxError).

With SCSS

Install stylelint-config-standard-scss (v13.0.0 and above; it is an optional peer dependency, only needed for this config):

npm install --save-dev stylelint-config-standard-scss

Set your stylelint config to:

{
    "extends": "stylelint-config-standard-vue/scss"
}

When used with stylelint-config-standard-scss:

{
    "extends": [
        "stylelint-config-standard-scss",
        "stylelint-config-standard-vue/scss"
    ]
}

Extending the config

Simply add a "rules" key to your config, then add your overrides and additions there.

For example, to add the unit-allowed-list rule:

{
    "extends": "stylelint-config-standard-vue",
    "overrides": [
        {
            "files": ["*.vue", "**/*.vue"],
            "rules": {
                "unit-allowed-list": ["em", "rem", "s"]
            }
        }
    ]
}

:computer: Editor integrations

Visual Studio Code

Use the stylelint.vscode-stylelint extension that Stylelint provides officially.

You have to configure the stylelint.validate option of the extension to check .vue files, because the extension does not check the *.vue file by default.

Example .vscode/settings.json:

{
  "stylelint.validate": [
      ...,
      // ↓ Add "vue" language.
      "vue"
  ]

:lock: License

See the LICENSE file for license rights and limitations (MIT).

Contributors

renovate[bot]

29 commits

ota-meshi

16 commits

Copilot

1 commits

ota-meshi/stylelint-config-standard-vue

The standard shareable Vue config for Stylelint.

27

stars

47

commits

JavaScript

primary language

Sep 7, 2026

updated

linter-config
stylelint
vue

README

stylelint-config-standard-vue

NPM license NPM version NPM downloads NPM downloads Build Status

The standard shareable Vue config for Stylelint.

This config:

Requirements

To see the rules that this config uses, please read the config itself.

:cd: Installation

npm install --save-dev postcss-html stylelint-config-html stylelint-config-recommended-vue stylelint-config-standard stylelint-config-standard-vue

The shared configs that this config extends (stylelint-config-html, stylelint-config-recommended-vue, and stylelint-config-standard) are peer dependencies, so you can control their versions from your own package.json.

:book: Usage

Set your stylelint config to:

{
    "extends": "stylelint-config-standard-vue"
}

Note: This config enables rules for only .vue files.

If you don't want the rules to be overridden (If you want to enable only the parser.), please use stylelint-config-html.

{
    "extends": "stylelint-config-html/vue"
}

Since this package configure customSyntax option to allow parsing Vue files, be sure it is the LAST item into the extends array, in case more than one configuration is applied. Not complying to this rule may result in broken Vue files parsing, generating confusing errors like Unknown word (CssSyntaxError).

With SCSS

Install stylelint-config-standard-scss (v13.0.0 and above; it is an optional peer dependency, only needed for this config):

npm install --save-dev stylelint-config-standard-scss

Set your stylelint config to:

{
    "extends": "stylelint-config-standard-vue/scss"
}

When used with stylelint-config-standard-scss:

{
    "extends": [
        "stylelint-config-standard-scss",
        "stylelint-config-standard-vue/scss"
    ]
}

Extending the config

Simply add a "rules" key to your config, then add your overrides and additions there.

For example, to add the unit-allowed-list rule:

{
    "extends": "stylelint-config-standard-vue",
    "overrides": [
        {
            "files": ["*.vue", "**/*.vue"],
            "rules": {
                "unit-allowed-list": ["em", "rem", "s"]
            }
        }
    ]
}

:computer: Editor integrations

Visual Studio Code

Use the stylelint.vscode-stylelint extension that Stylelint provides officially.

You have to configure the stylelint.validate option of the extension to check .vue files, because the extension does not check the *.vue file by default.

Example .vscode/settings.json:

{
  "stylelint.validate": [
      ...,
      // ↓ Add "vue" language.
      "vue"
  ]

:lock: License

See the LICENSE file for license rights and limitations (MIT).

Contributors

renovate[bot]

29 commits

ota-meshi

16 commits

Copilot

1 commits

Languages

JavaScript

100.0%