@davidsneighbour/stylelint-config

2024.3.11 • Public • Published

Stylelint

Add the configuration to your repository (for instance in .stylelintrc or .stylelintrc.json or the stylelint parameter in package.json):

{
  "extends": "@davidsneighbour/stylelint-config"
}

To change parts of the configuration use the rules parameter.

{
  "extends": "@davidsneighbour/stylelint-config",
  "rules": {
    "max-nesting-depth": null
  }
}

Add scripts to your package.json:

{
  "scripts": {
    "lint:styles": "stylelint assets/scss/",
    "lint:styles:fix": "stylelint assets/scss/ --fix",
    "lint:styles:config": "stylelint --print-config index.js"
  }
}

Exchange the assets/scss/ with your own styles folder.

Usage

Run stylelint and show errors and warnings:

npm run stylelint

Run stylelint and fix automatically fixable issues:

npm run stylelint:fix

Print the current stylelint configuration:

npm run stylelint:config

All configurations

Configurations
Build Tools
Babel Webpack
Testing
Cypress HTML Validate
Linters and Formatters
Browserslist ESLint PostCSS
Prettier Stylelint
Project Management
Commitlint Release
Markdown and Writing
Markdownlint Remark Lint
Other Tools
Bootstrap Tools

Readme

Keywords

none

Package Sidebar

Install

npm i @davidsneighbour/stylelint-config

Weekly Downloads

199

Version

2024.3.11

License

MIT

Unpacked Size

18.3 kB

Total Files

4

Last publish

Collaborators

  • davidsneighbour