@@ -62,6 +62,26 @@ npx @herb-tools/linter "lib/**/*.rhtml"
6262** Template Location:** ` lib/rdoc/generator/template/**/*.rhtml `
6363** CI Workflow:** ` .github/workflows/lint.yml `
6464
65+ #### Stylelint (CSS Files)
66+
67+ ``` bash
68+ # Lint CSS files
69+ npm run lint:css
70+
71+ # Auto-fix style issues
72+ npm run lint:css -- --fix
73+
74+ # Lint specific file
75+ npx stylelint " lib/rdoc/generator/template/aliki/css/rdoc.css"
76+ ```
77+
78+ ** Configuration:** ` .stylelintrc.json `
79+ ** Features:**
80+ - Detects undefined CSS custom properties (variables)
81+ - Detects missing ` var() ` function for custom properties
82+ - Style and formatting checks
83+ - Many issues auto-fixable with ` --fix `
84+
6585### Documentation Generation
6686
6787``` bash
@@ -198,6 +218,7 @@ Use Red, Green, Refactor approach:
1982186 . ** Lint your changes** :
199219 - Ruby code: ` bundle exec rubocop -A ` (auto-fix when possible)
200220 - ERB templates: ` npx @herb-tools/linter "**/*.rhtml" ` (if modified)
221+ - CSS files: ` npm run lint:css -- --fix ` (if modified)
201222
202223### Modifying Parsers
203224
@@ -228,15 +249,20 @@ When making changes to theme CSS or templates (e.g., Darkfish or Aliki themes):
2282496 . ** Verify with sub-agent** : Use Task tool again to launch agent that uses Browser MCP to verify fixes
229250 - Agent takes screenshots and compares to original issues
230251 - Agent reports back whether issues are resolved
231- 7 . ** Lint templates** (if modified): Run ` npx @herb-tools/linter "lib/rdoc/generator/template/**/*.rhtml" `
252+ 7 . ** Lint changes** (if modified):
253+ - ERB templates: ` npx @herb-tools/linter "lib/rdoc/generator/template/**/*.rhtml" `
254+ - CSS files: ` npm run lint:css -- --fix `
2322558 . ** Stop server** : Kill the HTTP server process when done
233256
234257** Tip:** Keep HTTP server running during iteration. Just regenerate with ` bundle exec rake rerdoc ` between changes.
235258
236259## Notes for AI Agents
237260
2382611 . ** Always run tests** after making changes: ` bundle exec rake `
239- 2 . ** Check both RuboCop and Herb** for linting
262+ 2 . ** Lint your changes** :
263+ - RuboCop for Ruby: ` bundle exec rubocop -A `
264+ - Herb for ERB templates: ` npx @herb-tools/linter "**/*.rhtml" `
265+ - Stylelint for CSS: ` npm run lint:css -- --fix `
2402663 . ** Regenerate parsers** if you modify ` .ry ` or ` .kpeg ` files
2412674 . ** Use ` rake rerdoc ` ** to regenerate documentation (not just ` rdoc ` )
2422685 . ** Verify generated files** with ` rake verify_generated `
0 commit comments