@bitfactory/stylelint-config
Version:
Stylelint sharable config for Bitfactory NL (part of NOBEARS) projects
105 lines (84 loc) • 1.69 kB
Markdown
> [!NOTE]
> When using Docker with `[p]npm` Make recipes add `make` before every command, and surround instruction with quotes.
To use Stylelint in the command-line, add the following scripts to your projects `package.json`:
```json
{
"scripts": {
"stylelint": "stylelint 'path/to/your/assets/**/*.css'",
"stylelint:fix": "pnpm run stylelint --fix"
}
}
```
```json
{
"scripts": {
"stylelint": "stylelint 'path/to/your/assets/**/*.css'",
"stylelint:fix": "npm run stylelint -- --fix"
}
}
```
```json
{
"scripts": {
"stylelint": "stylelint 'path/to/your/assets/**/*.scss'",
"stylelint:fix": "pnpm run stylelint --fix"
}
}
```
```json
{
"scripts": {
"stylelint": "stylelint 'path/to/your/assets/**/*.scss'",
"stylelint:fix": "npm run stylelint -- --fix"
}
}
```
```json
{
"scripts": {
"stylelint": "stylelint 'path/to/your/assets/**/*.vue'",
"stylelint:fix": "pnpm run stylelint --fix"
}
}
```
```json
{
"scripts": {
"stylelint": "stylelint 'path/to/your/assets/**/*.vue'",
"stylelint:fix": "npm run stylelint -- --fix"
}
}
```
```json
{
"scripts": {
"stylelint": "stylelint .",
"stylelint:fix": "pnpm run stylelint --fix"
}
}
```
```json
{
"scripts": {
"stylelint": "stylelint .",
"stylelint:fix": "npm run stylelint -- --fix"
}
}
```
You can run the commands with:
```bash
pnpm run stylelint
pnpm run stylelint:fix
```
```bash
npm run stylelint
npm run stylelint:fix
```
> With PNPM you can also run scripts without 'run' like `pnpm stylelint`.