prh-hyphen-regex-escape

Fix hyphen-related regex escapes in prh dictionaries for Node.js 20+.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/shimo4228/claude-code-learned-skills --skill prh-hyphen-regex-escape
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prh-hyphen-regex-escape
Source: https://github.com/shimo4228/claude-code-learned-skills/tree/main/skills/prh-hyphen-regex-escape
Command: npx skills add https://github.com/shimo4228/claude-code-learned-skills --skill prh-hyphen-regex-escape

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Node.js 20+ Unicode regex handling can error when prh dictionaries include hyphen-containing patterns. This guide explains the root cause and how to avoid hyphen-based pitfalls in prh spell dictionaries used with textlint-rule-prh.

Core Features & Use Cases

  • Explains why hyphen-containing patterns (e.g., Claude-first) cause SyntaxError and how to avoid them.
  • Recommends using hyphen-free variants for dictionary entries and provides editorial guidance for hyphenated terms.
  • Applies to maintenance of prh dictionaries in Node.js 20+ environments and textlint workflows.

Quick Start

Update your prh dictionary to include only hyphen-free patterns and review hyphenated terms manually.

Frequently Asked Questions about prh-hyphen-regex-escape

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

FAQPage Schema
Why does my prh dictionary throw a SyntaxError for hyphenated patterns in Node.js 20?

Hyphenated patterns in prh dictionaries cause SyntaxError in Node.js 20+ because Unicode regex handling rejects invalid escapes. You must use hyphen-free variants for dictionary entries and review hyphenated terms editorially.

How do I fix hyphen regex issues in prh spelling dictionaries?

Fix hyphen regex issues by updating your prh dictionary to include only hyphen-free patterns. Manually review hyphenated terms and replace them to satisfy Unicode regex handling in Node.js 20+.

Can I use hyphenated terms like Claude-first in textlint-rule-prh dictionaries?

Hyphenated terms like Claude-first cause regex errors in textlint-rule-prh on Node.js 20+. Use hyphen-free patterns instead and apply editorial guidance to manage hyphenated forms manually.

What causes invalid escape errors in textlint prh rules on Node.js 20+?

Invalid escape errors are caused by Node.js 20+ changing how Unicode regexes handle hyphen-containing patterns in prh dictionaries. Eliminate hyphens from regex patterns to resolve these errors.

When do I need to remove hyphens from my prh dictionary?

Remove hyphens from prh dictionaries when maintaining spelling dictionaries for textlint-rule-prh in Node.js 20+ environments, specifically when adding hyphenated terms that trigger SyntaxError.