Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kelysty/stylelint-config
Common Stylelint configuration
https://github.com/kelysty/stylelint-config
config stylelint
Last synced: 8 days ago
JSON representation
Common Stylelint configuration
- Host: GitHub
- URL: https://github.com/kelysty/stylelint-config
- Owner: Kelysty
- License: mit
- Created: 2023-11-24T01:45:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-28T05:57:14.000Z (about 1 year ago)
- Last Synced: 2025-01-12T18:08:10.594Z (15 days ago)
- Topics: config, stylelint
- Language: JavaScript
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# @kelysty/stylelint-config
## Install
Using `npm`:
```bash
npm install --save-dev stylelint postcss @kelysty/stylelint-config
```Using `yarn`:
```bash
yarn add --dev stylelint postcss @kelysty/stylelint-config
```## Usage
Add `.stylelintrc.js` file in the project root with the following content:
```js
module.exports = {
extends: ['@kelysty/stylelint-config'],
};
```### Prettier
If you are using Prettier, extend root config with the additional rules:
```js
module.exports = {
extends: ['@kelysty/stylelint-config', '@kelysty/stylelint-config/prettier'],
};
```### Order
If you want to order properties in your css files, extend root config with the additional rules:
```js
module.exports = {
extends: ['@kelysty/stylelint-config', '@kelysty/stylelint-config/order'],
};
```### Scripts
Do not forget to add following scripts in your `package.json` file:
```json
"scripts": {
"lint": "yarn run lint:styles && yarn run lint:other",
"lint:styles": "stylelint '**/*.{css,scss}' --report-needless-disables",
"lint:other": "yarn run prettier -- --check",
}
```