-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Summary
Add CSS/SCSS linting support for web development projects.
Tool to Add
stylelint (Linter)
- Purpose: Mighty CSS linter that helps avoid errors and enforce conventions
- Supports: CSS, SCSS, Sass, Less, SugarSS
- Installation:
- macOS:
brew install stylelint - Debian/Termux:
npm install -g stylelint
- macOS:
- Usage:
stylelint "**/*.css"orstylelint <file.css> - Config:
.stylelintrc.json,.stylelintrc.yml, orstylelint.config.js
Implementation Notes
1. Add to packages_data.go
{
command: "stylelint",
platforms: map[PlatformName]InstallMethod{
PlatformDarwin: BrewInstallMethod{Name: "stylelint"},
PlatformDebianLike: NpmInstallMethod{Name: "stylelint"},
PlatformTermux: NpmInstallMethod{Name: "stylelint"},
},
Imports: []Import{{Playbook: "setup-npm"}},
},2. Update setup-js-tools.yml to include CSS tools
---
# setup-js-tools.yml - JavaScript/TypeScript/CSS development tools
# JavaScript/TypeScript
- import_playbook: eslint.yml # JS/TS Linter (already exists)
- import_playbook: prettier.yml # Formatter (already exists)
- import_playbook: biome.yml # All-in-one (to be added)
# CSS/SCSS
- import_playbook: stylelint.yml # CSS LinterOr create separate setup-css-tools.yml:
---
# setup-css-tools.yml - CSS/SCSS development tools
- import_playbook: stylelint.yml # Linter
# Note: prettier (already in playbooks) can also format CSS/SCSS3. Add to all.yml
- import_playbook: setup-css-tools.ymlIntegration with Existing Tools
| Tool | Purpose | Formats | Status |
|---|---|---|---|
| prettier | Formatting | CSS, SCSS, Less | ✅ Already in playbooks |
| stylelint | Linting | CSS, SCSS, Sass, Less | ❌ To be added |
Together they provide complete CSS tooling:
- prettier: Handles formatting (indentation, spacing, etc.)
- stylelint: Handles linting (error detection, style rules)
Common Stylelint Configuration Presets
stylelint-config-standard- Standard CSS rulesstylelint-config-standard-scss- Standard SCSS rulesstylelint-config-prettier- Disables rules that conflict with Prettier
Acceptance Criteria
- Add stylelint playbook
- Update or create CSS tools grouping playbook
- Update
all.ymlto import CSS tools - Test on macOS
- Test on Debian/Ubuntu
- Test on Termux
Metadata
Metadata
Assignees
Labels
No labels