JSPM

stylelint-config-standard-vue

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 52690
  • Score
    100M100P100Q155342F
  • License MIT

The standard shareable Vue config for Stylelint.

Package Exports

  • stylelint-config-standard-vue
  • stylelint-config-standard-vue/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stylelint-config-standard-vue) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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

  • Stylelint v14.0.0 and above
    It cannot be used with Stylelint v13 and below.

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

💿 Installation

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

📖 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"
}

With SCSS

Install stylelint-config-standard-scss:

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"]
            }
        }
    ]
}

💻 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"
  ]

🔒 License

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