framework-parsers

Create and maintain markuplint framework parser and spec packages following architectural constraints.

611|63|Updated Sep 26, 2017
One-click install
npx skills add https://github.com/markuplint/markuplint --skill framework-parsers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: framework-parsers
Source: https://github.com/markuplint/markuplint/tree/main/.claude/skills/framework-parsers
Command: npx skills add https://github.com/markuplint/markuplint --skill framework-parsers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding a new template engine or framework parser to markuplint involves strict architectural contracts, and violating them breaks the build or silently disables component detection at runtime.

Core Features & Use Cases

  • Package Type Guidance: Distinguishes template engine parsers (extend HtmlParser, configure only ignoreTags) from full framework parsers (extend Parser and implement tokenize, nodeize, visitAttr, detectElementType).
  • Constraint Enforcement: Codifies seven rules covering ExtendedSpec exports, potentialName attribute mapping, nodeListToDebugMaps testing, and the mandatory component-scanner subpath export.
  • Use Case: When adding a new @markuplint/vue-parser or @markuplint/svelte-spec package, follow the sibling package structure (ejs-parser, astro-parser, react-spec) and avoid the circular dependency caused by importing @markuplint/pretenders inside component-scanner.

Quick Start

Help me create a new @markuplint parser package for my template engine following the markuplint framework parser conventions.

Frequently Asked Questions about framework-parsers

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

FAQPage Schema
How do I create a new markuplint parser for a template engine?

Create a @markuplint/<lang>-parser package that extends HtmlParser and configures only the ignoreTags option. Never override tokenize() or nodeize() for template engine parsers, and model the structure on the existing ejs-parser package.

What is the difference between a template engine parser and a full framework parser in markuplint?

Template engine parsers extend HtmlParser and only configure ignoreTags. Full framework parsers extend the base Parser class, implement tokenize(), nodeize(), visitAttr(), and detectElementType(), and delegate tokenization to the framework's own parser library.

Why are my framework components not detected by markuplint?

Full framework parsers must ship a component-scanner subpath export in package.json. The @markuplint/pretenders package dynamically imports it at runtime for auto scan, so without this export the framework's components are never detected.

Can I import @markuplint/pretenders inside a component-scanner module?

No, importing @markuplint/pretenders inside component-scanner creates a circular dependency in the lerna build graph. Instead, define local types that are structurally compatible with its ComponentScanner interface.

How do I map framework attributes to standard HTML attributes in markuplint?

Use potentialName for attribute mapping. It tells markuplint which standard HTML attribute a framework-specific attribute corresponds to, enabling rules to evaluate framework markup against HTML specifications.