erb-parser-maintenance

Update ERubyParser ignoreTags patterns and run unit tests.

606|64|Updated Sep 26, 2017
One-click install
npx skills add https://github.com/markuplint/markuplint --skill erb-parser-maintenance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: erb-parser-maintenance
Source: https://github.com/markuplint/markuplint/tree/main/packages/%40markuplint/erb-parser
Command: npx skills add https://github.com/markuplint/markuplint --skill erb-parser-maintenance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps maintain the ERB parser by managing ignoreTags patterns to correctly respect ERB blocks during HTML linting.

Core Features & Use Cases

  • Add new ERB ignoreTags patterns to recognize additional ERB variants without breaking HTML parsing.
  • Modify existing ignoreTags entries to adapt to new syntax or edge cases in templates.
  • Use case: teams extending ERB support across a project can keep parsing stable by updating ignoreTags and running tests.

Quick Start

Update src/parser.ts to add or modify an ignoreTags entry, then run yarn build and yarn test to verify changes.

Frequently Asked Questions about erb-parser-maintenance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an HTML linter treat ERB tags as opaque blocks?

To make an HTML linter treat ERB tags as opaque blocks, you need to update the ignoreTags patterns in the ERubyParser constructor to define ERB tag boundaries, ensuring correct AST generation and node labeling during linting.

What is the process to add new ERB syntax support to a TypeScript parser?

Adding new ERB syntax support involves updating the ignoreTags entry in src/parser.ts to recognize the new variants, then rebuilding the package and running unit tests to verify correct behavior.

Why does my HTML linter break when parsing ERB templates?

HTML linting breaks on ERB templates when ignoreTags patterns are outdated or missing, causing the parser to misinterpret ERB tags as standard HTML and generate an incorrect AST structure.

How do I modify existing ignoreTags entries for ERB parser edge cases?

Modifying existing ignoreTags entries requires adjusting the tag boundaries in the ERubyParser constructor within src/parser.ts, followed by running yarn build and yarn test to confirm the changes resolve the edge cases.

Do I need to rebuild the package after updating ERB ignoreTags patterns?

Yes, you must rebuild the package by running yarn build after updating ERB ignoreTags patterns in src/parser.ts, and subsequently run yarn test to ensure the AST generation and node labeling function correctly.