remark-lint-no-chinese-punctuation-in-number

raw JSON →
0.1.2 verified Fri May 01 auth: no javascript

A remark-lint rule that warns when Chinese full-width punctuation (e.g., :, ,) is used inside numbers, enforcing correct half-width punctuation like : and ,. Version 0.1.2 is the latest stable release; development appears sporadic with no recent commits. It is a focused, low-configuration plugin for the remark-lint ecosystem, with minimal dependencies.

error Cannot find module 'remark-lint-no-chinese-punctuation-in-number'
cause Package not installed or not in node_modules.
fix
Run npm install remark-lint-no-chinese-punctuation-in-number --save-dev
error Error: Expected a `function` for `this.use`, but got `undefined`
cause The plugin function is not resolved correctly, likely due to incorrect import path or export issue.
fix
Ensure the import is using default import: import plugin from 'remark-lint-no-chinese-punctuation-in-number'
deprecated Package is based on legacy remark-lint architecture and may not work with future major versions of remark (v13+).
fix Consider migrating to unified-lint-rule or using remark-lint v8 compatible versions.
gotcha The plugin only detects full-width colon and comma; other Chinese punctuation in numbers (e.g., ;) are not flagged.
fix Manually extend the rule or use a more comprehensive Chinese punctuation linter.
npm install remark-lint-no-chinese-punctuation-in-number
yarn add remark-lint-no-chinese-punctuation-in-number
pnpm add remark-lint-no-chinese-punctuation-in-number

Shows how to use the plugin with remark and remark-lint to lint markdown and report any Chinese punctuation in numbers.

import { remark } from 'remark';
import remarkLint from 'remark-lint';
import remarkLintNoChinesePunctuationInNumber from 'remark-lint-no-chinese-punctuation-in-number';
import { readSync } from 'to-vfile';
import { reporter } from 'vfile-reporter';

const file = readSync('readme.md');
remark()
  .use(remarkLint)
  .use(remarkLintNoChinesePunctuationInNumber)
  .process(file)
  .then((file) => {
    console.error(reporter(file));
  });