culur / stylelint-config

Sharing Stylelint configurations
https://npm.im/@culur/stylelint-config
MIT License
4 stars 0 forks source link
config stylelint

@culur/stylelint-config

Culur's config for Stylelint.

Features

Extends

Custom Syntax

Because Stylelint no longer includes parsers (for scss, vue...) this config will use the overrides property to config the following syntaxes if needed.

Auto detect environment

The config is smart enough to detect the environment automatically.

Dependencies

This config bundles the following packages, you don't need to install them yourself anymore

Install

Add @culur/stylelint-config dependency to your project.

# Using npm
npm install @culur/stylelint-config --save-dev

# Using yarn
yarn add @culur/stylelint-config --dev

Usage

If you've installed @culur/stylelint-config locally within your project, Just set your stylelint config to:

{
  "extends": ["@culur/stylelint-config"]
}

If you've globally installed @culur/stylelint-config using the -g flag, then you'll need to use the absolute path to @culur/stylelint-config in your config e.g.

{
  "extends": "/absolute/path/to/@culur/stylelint-config"
}

Scripts

Some commonly used scripts in package.json.

{
  "scripts": {
    "fix:css": "stylelint **/*.{vue,tsx,css,scss} --allow-empty-input --fix",
    "test:css": "stylelint **/*.{vue,tsx,css,scss} --allow-empty-input"
  }
}

Related

Stylelint

Library

Configuration

Syntaxes

Plugins