1.0.0 • Published 5 months ago

@kaehehehe/stylelint-config v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

@kaehehehe/stylelint-config

A shared and opinionated Stylelint config for modern front-end projects.

This config is optimized for projects using Emotion or CSS Modules,
but works in standard .css / .scss files as well.

✨ Features

  • ✅ Support for Emotion (@emotion/react)
  • ✅ Support for CSS Modules
  • ✅ Standard rules from stylelint-config-standard
  • ✅ Prettier-compatible (stylelint-config-prettier)
  • ✅ Logical CSS property ordering with stylelint-order

📦 Installation

npm install --save-dev stylelint @kaehehehe/stylelint-config stylelint-config-standard stylelint-config-prettier stylelint-order @stylelint/postcss-css-in-js postcss-scss

or

yarn add -D stylelint @kaehehehe/stylelint-config stylelint-config-standard stylelint-config-prettier stylelint-order @stylelint/postcss-css-in-js postcss-scss

or

pnpm add -D stylelint @kaehehehe/stylelint-config stylelint-config-standard stylelint-config-prettier stylelint-order @stylelint/postcss-css-in-js postcss-scss

🚀 Usage

  1. Create a .stylelintrc.js file in your project root with the following content:
module.exports = {
  extends: ["@kaehehehe/stylelint-config"],
};

Alternatively, add this to your package.json:

{
  "stylelint": {
    "extends": "@kaehehehe/stylelint-config"
  }
}
  1. Add a lint script to your package.json:
{
  "scripts": {
    "lint:style": "stylelint '**/*.{css,scss,js,jsx,ts,tsx}'"
  }
}