1.2.0 • Published 3 years ago

@dlwlrma/stylelint-config v1.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Stylelint Config Preset

HanJeaHwan NPM version NPM Downloads

Installation

yarn add @dlwlrma/stylelint-config --D

After installation create a file stylelint.config.js at project root and extend the config:

{
  "extends": ["@dlwlrma/stylelint-config"],
  "rules": {}
}

Usage

Simply read the stylelint documentation and follow those instructions.

Git Hook

Setup pre-commit hook for styles linting.

yarn add husky --D
npm install husky --save-dev

Update package.json

 "scripts": {
    "lint:style": "stylelint \"**/*.less\" --syntax less --fix --allow-empty-input",
  },
  "husky": {
    "hooks": {
      "pre-commit": "npm run lint:style"
    }
  },