npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cffnpwr/textlint-rule-no-arbitrary-line-break

v1.1.0

Published

許可された記号の直後以外での段落内の改行を検出するtextlintルール

Readme

@cffnpwr/textlint-rule-no-arbitrary-line-break

GitHub License npm Version JSR Version

A textlint rule that detects line breaks within a paragraph anywhere other than immediately after an allowed symbol.

日本語のREADMEはこちら

When wrapping text to comply with line-length limits such as markdownlint's MD013, this rule enforces breaking lines immediately after a delimiter such as a comma or period, rather than at an arbitrary position. A line break at a position unrelated to a delimiter makes the sentence harder to follow.

<!-- NG -->
この機能は長い説明が必要にな
るので途中で改行しています。

<!-- OK -->
この機能は長い説明が必要になるので、
読点の直後で改行しています。

Both source-level wrapping (softbreak) and hard breaks (two trailing spaces or \) are inspected. When judging a hard break, trailing whitespace and \ are ignored, and the character immediately preceding them is used to determine whether the break is allowed. Line breaks inside and immediately after inline elements (links, emphasis, inline code, images, HTML elements) are not targeted. Wrapping immediately after [リンク](url) or <br> is not reported. Content under a quote (BlockQuote) is also excluded by default.

Whereas @cffnpwr/textlint-rule-sentence-per-line enforces "always break at the end of a sentence", this rule restricts "the positions where a line break is allowed within a sentence". Enabling both establishes the discipline that "a line break is allowed only at the end of a sentence or immediately after a delimiter symbol".

This rule supports autofix via textlint --fix. The fix removes the line break together with the surrounding whitespace (and a trailing \ for a hard break), joining the two lines into one. A single half-width space is kept only when the character immediately before and the character immediately after the removed range are both non-Japanese (for example, between two English words); otherwise the lines are joined directly with no space.

How to Install

npm

npm install --save-dev @cffnpwr/textlint-rule-no-arbitrary-line-break

or

npx jsr add -D @cffnpwr/textlint-rule-no-arbitrary-line-break

yarn

yarn add --dev @cffnpwr/textlint-rule-no-arbitrary-line-break

or

yarn dlx jsr add -D @cffnpwr/textlint-rule-no-arbitrary-line-break

pnpm

pnpm add --save-dev @cffnpwr/textlint-rule-no-arbitrary-line-break

or

pnpm dlx jsr add -D @cffnpwr/textlint-rule-no-arbitrary-line-break

Bun

bun add --dev @cffnpwr/textlint-rule-no-arbitrary-line-break

or

bunx jsr add -D @cffnpwr/textlint-rule-no-arbitrary-line-break

Deno

deno add --dev npm:@cffnpwr/textlint-rule-no-arbitrary-line-break

or

deno add --dev jsr:@cffnpwr/textlint-rule-no-arbitrary-line-break

How to Use

Add it to .textlintrc.json.

{
  "rules": {
    "@cffnpwr/textlint-rule-no-arbitrary-line-break": true
  }
}

Options

interface Options {
  allowAfter?: string[];
  skipBlockQuote?: boolean;
}

| Option | Default | Description | | --- | --- | --- | | allowAfter | ["、", "。", "!", "?", "」", "』", ")", "]", "】", ",", ".", "!", "?", ")", "]"] | List of characters after which a line break is allowed. Each element is a single character consisting of one UTF-16 code unit (characters outside the BMP, such as emoji, cannot be specified). When specified, it overrides the default | | skipBlockQuote | true | Excludes content under quotes (BlockQuote) from inspection |

Specifying an unknown option key or an invalid value (including an element of two or more characters in allowAfter) results in an error. Specifying an empty array for allowAfter causes every line break within a paragraph to be reported.

{
  "rules": {
    "@cffnpwr/textlint-rule-no-arbitrary-line-break": {
      "allowAfter": ["、", "。"]
    }
  }
}

License

MIT