stylelint-config-astro

1.0.4 • Public • Published

stylelint-config-astro

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

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.

Package Sidebar

Install

npm i stylelint-config-astro

Weekly Downloads

1,033

Version

1.0.4

License

MIT

Unpacked Size

9.68 kB

Total Files

22

Last publish

Collaborators

  • mattpfeffer