Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.76 KB

README.md

File metadata and controls

58 lines (41 loc) · 1.76 KB

stylelint-config-itp

NPM version MIT License

In The Pocket's default configuration for Stylelint.

The current configuration is a hard copy of Bootstrap's latest Stylelint configuration. We didn't make any changes to it and like to keep it that way to avoid any discussions and keep this maintainable. Whenever Bootstrap decides to make changes, we need to make changes, that's the idea.

PR with more info.

Extends stylelint-config-standard and stylelint-config-recommended-scss

Plugins used: stylelint-order

Usage

Install the following packages in your project:

npm install stylelint-config-itp stylelint husky lint-staged --save-dev

Add .stylelintrc to the root of your project:

{
  "extends": "stylelint-config-itp"
}

Add .stylelintignore (if you need one) to the root of your project:

**/*.min.css
**/dist/
**/vendor/
/_gh_pages/

Update your package.json:

{
  "scripts": {
+   "precommit": "lint-staged"
  },
+ "lint-staged": {
+   "*.{css,scss}": ["stylelint --fix", "git add"]
+ }
}