1.1.1 • Published 6 years ago

stylelint-config-goodeggs v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

stylelint-config-goodeggs

Shared Good Eggs stylelint config.

Usage

To use, install both this module and stylelint:

$ yarn add --dev stylelint@^9 stylelint-config-goodeggs 

Configuration

Add the following configuration to your package.json:

"stylelint": {
  "extends": [
    "stylelint-config-goodeggs"
  ]
}

If using CSS modules, instead use this configuration:

"stylelint": {
  "extends": [
    "stylelint-config-goodeggs/css-modules"
  ]
}

To use autoprefixer (in this example, in conjunction with CSS modules):

"stylelint": {
  "extends": [
    "stylelint-config-goodeggs/autoprefixer",
    "stylelint-config-goodeggs/css-modules"
  ]
}

NPM Scripts

Configure your lint and formatting tasks like this:

"scripts": {
  "fmt": "yarn run fmt:src && yarn run fmt:css",
  "fmt:css": "yarn run lint:css --fix",
  "fmt:src": "yarn run lint:src --fix",
  "lint": "yarn run lint:src && yarn run lint:css",
  "lint:css": "stylelint '**/*.css'",
  "lint:src": "eslint '**/*.{js,jsx,ts,tsx}'"
}