Greylock Labs Stylelint rules
Install the package and all of its peer dependencies:
$ npx install-peerdeps --dev @greylocklabs/stylelint-config
Afterwards, create a .stylelintrc
file in your root project folder and add the following:
{
"extends": "@greylocklabs/stylelint-config"
}
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",
"rules": {
"number-leading-zero": null
}
}
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:
- JSX/TSX files using Styled Components
- Other CSS-in-JS solutions
You should instead install @greylocklabs/stylelint-config-styled-components.
Eventually, the goal is to merge the two projects together.
Run yarn test
to run unit tests.
MIT License. See LICENSE file for details.