1.0.4 • Published 2 years ago

stylelint-config-astro v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

stylelint-config-astro

A shareable Stylelint config for linting Astro (.astro) files :rocket:

The low down

This config bundles postcss-html and configures it to parse .astro files so you can use Stylelint on the <style></style> section within those components.

Minimum Requirements

This package is compatible with the following peer dependencies:

Installation

# Using npm
npm install --save-dev postcss-html stylelint-config-astro

# Using Yarn
yarn add --dev postcss-html stylelint-config-astro

Usage

Append to the extends array in your .stylelintrc.* file. It's usually best placed after your other rulesets.

{
    "extends": [
        // other configs ...
        "stylelint-config-astro"
    ]
}

Integrations

Visual Studio Code

Use the official stylelint.vscode-stylelint extension.

Add the .astro file extension to stylelint.validate under settings to enable linting for Astro files.

.vscode/settings.json:

{
    "stylelint.validate": [
        // other file extensions...
        "astro"
    ]
}

Credits

Although this package is not a direct fork it heavily leverages the the work of @ota-meshi in stylelint-config-html.