UNPKG

@aleph/stylelint-config

Version:

Aleph's StyleLint configuration for CSS, SCSS, and styled-components

132 lines (99 loc) 4.63 kB
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.1.0] - 2025-08-13 ### ✨ Added - **Ignore Files**: Added `ignoreFiles` for JS files and node_modules - **Flexible Spacing**: Disabled rigid spacing rules for better developer experience - **CSS-in-JS Support**: Allow mixed case for value keywords - **Legacy Browser Support**: Allow vendor prefixes when needed - **Enhanced SCSS Rules**: More flexible SCSS operator and mixin rules ### 🔧 Changed - **Property Order**: Updated to more streamlined order matching established patterns - **Selector Rules**: Allow flexible class naming patterns and vendor prefixes - **SCSS Variables**: Updated pattern to proper kebab-case with better error messages - **At-Rules**: Improved handling of SCSS imports and mixins - **Error Prevention**: Added `declaration-block-no-redundant-longhand-properties` with grid exceptions ### 🚫 Disabled Rules - `value-keyword-case`: Allow mixed case for CSS-in-JS compatibility - `property-no-vendor-prefix`: Allow vendor prefixes when needed - `selector-no-vendor-prefix`: Allow vendor prefixes for legacy support - `selector-class-pattern`: Allow flexible class naming - `at-rule-no-unknown`: Use SCSS-specific version instead - `no-invalid-position-at-import-rule`: Allow imports in SCSS partials - Various SCSS operator rules for better development experience - `custom-property-empty-line-before`: Allow flexible spacing - `declaration-empty-line-before`: Allow flexible spacing ### 📋 Improved Compatibility - Better alignment with existing StyleLint configurations - Enhanced support for modern CSS-in-JS libraries - Improved SCSS development workflow - More practical property ordering ## [1.0.0] - 2025-08-13 ### 🚀 Initial Release This is the initial release of Aleph's comprehensive StyleLint configuration. ### ✨ Added - **Comprehensive CSS/SCSS Linting**: Complete rule set for modern CSS and SCSS development - **Standard Config Foundation**: Built on `stylelint-config-standard` and `stylelint-config-standard-scss` - **Property Ordering**: Logical CSS property ordering with `stylelint-order` - **SCSS Support**: Full SCSS syntax support with `stylelint-scss` - **Quality Rules**: Prevents common CSS issues and enforces best practices - **Consistent Formatting**: 2-space indentation, 100-character lines, single quotes - **BEM-Friendly**: Supports BEM methodology and CSS modules - **Modern CSS Support**: Works with CSS Grid, Flexbox, custom properties ### 🎯 Features #### CSS Standards - Consistent color formatting (lowercase hex, short notation) - Standardized units and measurements - Proper spacing and indentation - Unix line endings #### Property Organization - Logical property order: box model → positioning → flexbox/grid → dimensions → spacing → borders → background → typography → animations - Custom properties prioritized - Consistent declaration grouping #### SCSS Features - Variable naming conventions (`$kebab-case`) - Mixin and function naming patterns - Import organization best practices - Placeholder selector standards #### Quality Enforcement - No duplicate selectors or properties - Maximum selector specificity limits (0,4,0) - No vendor prefixes (use autoprefixer) - No `!important` declarations - Maximum 4 compound selectors - No unknown properties or pseudo-classes ### 📁 File Support - CSS files (`.css`) - SCSS files (`.scss`) - Sass files (`.sass`) - Styled-components (in JS/TS files) - CSS Modules - PostCSS files ### 🔧 Configuration - Simple extend-based configuration - IDE integration support (VS Code) - CI/CD ready - Customizable for project-specific needs ### 📚 Documentation - Comprehensive README with examples - Common patterns and best practices - Troubleshooting guide - IDE setup instructions - CI/CD integration examples ### 🔗 Dependencies - `stylelint-config-standard`: ^36.0.0 - `stylelint-config-standard-scss`: ^13.0.0 - `stylelint-order`: ^6.0.0 - `stylelint-scss`: ^6.0.0 ### 📋 Requirements - Node.js 16+ - StyleLint 16+ ### 🎨 Rule Highlights - **Color**: Lowercase hex, short notation, no named colors - **Typography**: Single quotes, proper font declarations - **Spacing**: 2-space indentation, consistent margins/padding - **Selectors**: BEM-friendly, max specificity 0,4,0, no IDs - **Properties**: Logical ordering, no vendor prefixes - **SCSS**: Kebab-case variables, organized imports