rakeshmenon / stylelint-config-styled-components-processor

The shareable stylelint config for stylelint-processor-styled-components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stylelint-config-styled-components-processor

The shareable stylelint config for stylelint-processor-styled-components

why

When using stylelint-processor-styled-components a couple of stylelint rules throw errors that you cannot prevent. Like 'no-empty-source' or 'no-missing-end-of-source-newline'.

This shareable config will automatically disable rules that cause unresolvable conflicts. Besides those rules vendor prefixed properties and values will throw an error since styled-components automatically generates vendor prefixes for your css. Note that if you want to change any of these rules you can always override them in your stylelint config.

installation

npm install stylelint-config-styled-components-processor --save-dev

usage

After installing, add this config to your stylelint config like so:

{
  "extends": "stylelint-config-styled-components-processor"
}

If you're extending multiple shareable configs, put this config as the first so it overrides all following rules like so:

{
  "extends": [
    "stylelint-config-styled-components-processor"
    "stylelint-config-standard",
  ]
}

See also https://stylelint.io/user-guide/configuration for documentation on the various ways stylelint can be configured.

license

MIT

About

The shareable stylelint config for stylelint-processor-styled-components


Languages

Language:JavaScript 100.0%