https://github.com/etchteam/stylelint
Our shared stylelint config
https://github.com/etchteam/stylelint
Last synced: 4 months ago
JSON representation
Our shared stylelint config
- Host: GitHub
- URL: https://github.com/etchteam/stylelint
- Owner: etchteam
- License: isc
- Created: 2022-12-19T10:59:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-22T05:48:15.000Z (5 months ago)
- Last Synced: 2026-01-22T19:58:34.773Z (5 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@etchteam/stylelint-config
- Size: 481 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @etchteam/stylelint
The [stylelint](https://stylelint.io/) config that we use at [Etch](https://etch.co)
## Install
```bash
npm i -D stylelint prettier @etchteam/stylelint-config
```
## Usage
```bash
echo "module.exports = { extends: ['@etchteam/stylelint-config'] };" > stylelint.config.cjs
```
### With lint-staged
#### New project
Run the following:
```bash
npm i -D husky lint-staged
echo "module.exports = { '*.{css,scss}': 'stylelint --fix' };" > lint-staged.config.cjs
npx husky init
echo "npx --no-install -- lint-staged" > .husky/pre-commit
```
#### Existing project with husky and lint staged
Add the following to your lint-staged config:
`'*.{css,scss}': 'stylelint --fix'`
## Usage with VSCode
### New project with no VSCode config
Run the following:
```bash
mkdir .vscode
echo "{ \"editor.formatOnSave\": false, \"editor.codeActionsOnSave\": { \"source.fixAll.stylelint\": true } }" > .vscode/settings.json
```
### Exisiting project with VSCode config
Add the following to `.vscode/settings.json`:
```json
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
```