@lobehub/stylelint-config
v2.0.1
Published
Stylelint configuration for LobeHub projects
Keywords
Readme
Stylelint configuration for LobeHub projects
Features
- Standard stylelint rules
- Property ordering with
stylelint-config-clean-order - Less support
- CSS-in-JS support (styled-components, emotion, etc.)
- Logical properties enforcement
Installation
pnpm add -D @lobehub/stylelint-config stylelintUsage
Create stylelint.config.js (or .stylelintrc.js) in your project root:
import config from '@lobehub/stylelint-config';
export default config;Or for CommonJS:
module.exports = require('@lobehub/stylelint-config').default;Supported File Types
.css- Standard CSS files.less- Less preprocessor files.js,.jsx,.ts,.tsx- CSS-in-JS (styled-components, emotion)
Configuration
The config extends:
stylelint-config-standardstylelint-config-recommendedstylelint-config-clean-order
And includes:
stylelint-lessfor Less supportpostcss-styled-syntaxfor CSS-in-JSstylelint-use-logical-specfor logical properties
Extending the Config
import config from '@lobehub/stylelint-config';
export default {
...config,
rules: {
...config.rules,
'color-hex-length': 'long',
},
};Requirements
- Node.js >= 18
- Stylelint >= 16.0.0
License
MIT © LobeHub
