1.0.0 • Published 5 months ago
@kaehehehe/stylelint-config v1.0.0
@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-scssor
yarn add -D stylelint @kaehehehe/stylelint-config stylelint-config-standard stylelint-config-prettier stylelint-order @stylelint/postcss-css-in-js postcss-scssor
pnpm add -D stylelint @kaehehehe/stylelint-config stylelint-config-standard stylelint-config-prettier stylelint-order @stylelint/postcss-css-in-js postcss-scss🚀 Usage
- 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"
}
}- Add a lint script to your package.json:
{
"scripts": {
"lint:style": "stylelint '**/*.{css,scss,js,jsx,ts,tsx}'"
}
}1.0.0
5 months ago