@greylocklabs/stylelint-config-styled-components
v1.2.1
Published
Greylock Labs Stylelint rules for projects using Styled Components
Downloads
8
Maintainers
Readme
@greylocklabs/stylelint-config-styled-components
Greylock Labs Stylelint rules for projects using Styled Components
Installation
Install the package and all of its peer dependencies:
$ npx install-peerdeps --dev @greylocklabs/stylelint-config-styled-components
Afterwards, create a .stylelintrc
file in your root project folder and add the following:
{
"extends": "@greylocklabs/stylelint-config-styled-components"
}
Configuration
To override anything, simply add a rules
property to your .stylelintrc
file and add new or existing rules to it with your preferred settings:
{
"extends": "@greylocklabs/stylelint-config-styled-components",
"rules": {
"number-leading-zero": null
}
}
Need to lint CSS or HTML files?
Unfortunately, as of now Stylelint does not support using one config file to target different file types. If your project uses any of the following:
.css
or.scss
files- Vue Single File Components
- HTML files with inline styles
You should instead install @greylocklabs/stylelint-config. It is capable of handling "everything else" when it comes to CSS styles.
Eventually, the goal is to merge the two projects together.
Testing
To run tests for this package, install the development dependencies with
npm install
from this folder and then run npm test
.
License
MIT License. See LICENSE file for details.