JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 280
  • Score
    100M100P100Q86028F
  • License MIT

Package Exports

  • @tiagoporto/stylelint-config

Readme

@tiagoporto/stylelint-config

Shareable Config for stylelint.

Installation

npm install --save-dev stylelint @tiagoporto/stylelint-config

Usage

// .stylelintrc.mjs
export default {
  extends: ['@tiagoporto/stylelint-config'],
}

In package.json add the following scripts:

{
  "scripts": {
    "lint:styles": "stylelint \"**/*.{css,scss}\"",
    "lint:styles:fix": "stylelint \"**/*.{css,scss}\" --fix"
  }
}

Lint-staged

Check staged markdown

// .lintstagedrc.mjs
export default {
  '*.{scss,vue}': ['stylelint --fix'],
}

Editor

For VSCode is recommended the following extensions:

// .vscode/settings.json
{
  "editor.codeActionsOnSave": {
    "source.fixAll.stylelint": "always"
  },
  "stylelint.validate": ["css", "scss"]
}