@falcon0387/textlint-rule-japanese-parentheses
v0.3.1
Published
textlint rule to enforce consistent Japanese parenthesis style (full-width vs half-width)
Maintainers
Readme
@falcon0387/textlint-rule-japanese-parentheses
A fixable textlint rule that enforces full-width parentheses in Japanese context and half-width in Latin/code context.
Install
bun add -D @falcon0387/textlint-rule-japanese-parenthesesUsage
rules:
"@falcon0387/japanese-parentheses": trueOptions
rules:
"@falcon0387/japanese-parentheses":
# Use half-width parentheses for LaTeX commands (\ref, \cite* by default).
# boolean | { mode?: "allow" | "force", extraCommands?: string[] }
# Shorthand: true is equivalent to { mode: "force" }.
halfWidthForLatexCommands: false # e.g. { mode: "allow", extraCommands: ["eqref", "autoref"] }
# Use half-width parentheses when content is a single code/math token.
halfWidthForSingleToken: true
# Use half-width parentheses for numeric labels after configured prefixes.
# string[] | { mode?: "allow" | "force", prefixes: string[] }
# Shorthand: ["式", "図"] is equivalent to { mode: "force", prefixes: ["式", "図"] }.
halfWidthForNumericLabel: [] # e.g. { mode: "force", prefixes: ["式", "図", "表"] }
# Extra regex patterns for regions to skip.
additionalMaskPatterns: []
# Extra AST node types to ignore.
ignoredNodeTypes: []Release
Automated via release-please.
Merge the auto-generated Release PR to bump version, update CHANGELOG.md, and create a tag.
