Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/greylocklabs/stylelint-config-styled-components
Greylock Labs Stylelint rules for projects using Styled Components
https://github.com/greylocklabs/stylelint-config-styled-components
javascript js linter react styled-components stylelint stylelint-config ts typescript
Last synced: 11 days ago
JSON representation
Greylock Labs Stylelint rules for projects using Styled Components
- Host: GitHub
- URL: https://github.com/greylocklabs/stylelint-config-styled-components
- Owner: greylocklabs
- Created: 2019-02-22T05:56:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T20:16:36.000Z (almost 2 years ago)
- Last Synced: 2023-02-28T03:06:44.969Z (over 1 year ago)
- Topics: javascript, js, linter, react, styled-components, stylelint, stylelint-config, ts, typescript
- Language: JavaScript
- Size: 958 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
Awesome Lists containing this project
README
# @greylocklabs/stylelint-config-styled-components
> Greylock Labs Stylelint rules for projects using Styled Components
---
[![npm version](https://badge.fury.io/js/%40greylocklabs%2Fstylelint-config-styled-components.svg)](https://badge.fury.io/js/%40greylocklabs%2Fstylelint-config-styled-components)
## Installation
Install the package and all of its peer dependencies:
```bash
$ npx install-peerdeps --dev @greylocklabs/stylelint-config-styled-components
```Afterwards, create a `.stylelintrc` file in your root project folder and add the following:
```json
{
"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:```json
{
"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:1. `.css` or `.scss` files
2. Vue Single File Components
3. HTML files with inline stylesYou should instead install
[@greylocklabs/stylelint-config](https://www.npmjs.com/package/@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.