remark-lint-no-repeat-punctuation

raw JSON →
0.1.4 verified Fri May 01 auth: no javascript maintenance

A remark-lint plugin that warns when punctuation characters are repeated in series, such as multiple exclamation marks or ellipsis dots. Version 0.1.4, last updated in 2017, with no recent releases. It is a niche plugin for CJK and punctuation normalization, used with remark-lint. Alternative: remark-lint-no-multiple-full-stops but this covers more characters.

error Error: Cannot find module 'remark-lint-no-repeat-punctuation'
cause Package not installed or not in node_modules.
fix
npm install remark-lint-no-repeat-punctuation
error TypeError: remark(...).use is not a function
cause Unified/remark version mismatch; v10+ changed API.
fix
Use remark@^9 or update to unified@^8 and use .use() correctly.
error Warning: Plugins must be functions or tuples, got object
cause Plugin required incorrectly; not a function.
fix
Use require('remark-lint-no-repeat-punctuation') directly without .default.
gotcha Default punctuation list includes Chinese/Japanese punctuation (!~。,·?) and ASCII equivalents (!~.,?). Only these are flagged; custom list not supported.
fix If you need to customize punctuation set, fork the package or use a different rule.
gotcha Plugin only warns about repeats of the same character; does not detect mixed repeated punctuation (e.g., !?!) or sequences like ... (three dots are handled but as individual repeats).
fix None; behavior by design.
deprecated Package has not been updated since 2017; may not work with newer versions of remark/unified ecosystem.
fix Consider using remark-lint-no-multiple-full-stops for similar functionality or check compatibility with your unified version.
npm install remark-lint-no-repeat-punctuation
yarn add remark-lint-no-repeat-punctuation
pnpm add remark-lint-no-repeat-punctuation

Demonstrates using the plugin with remark-lint to detect repeated punctuation.

import { remark } from 'remark';
import remarkLint from 'remark-lint';
import noRepeatPunctuation from 'remark-lint-no-repeat-punctuation';
import reporter from 'vfile-reporter';

remark()
  .use(remarkLint)
  .use(noRepeatPunctuation)
  .process('Hello!!!', (err, file) => {
    console.error(reporter(err || file));
  });
// Output: no-file:1:8: Should not repeat "!"