{"id":26282,"library":"remark-lint-spaces-around-number","title":"remark-lint-spaces-around-number","description":"A remark-lint plugin (v0.1.2) enforcing spacing between numbers and Chinese characters per the Chinese Document Style Guide. It warns when a number (including percentages) is directly adjacent to Chinese text without a space. Designed for use with remark-lint, it integrates into remark CLI, config files, or API. Differs from general lint rules by targeting CJK typographic conventions; actively maintained with irregular release cadence.","status":"active","version":"0.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/laysent/remark-lint-plugins","tags":["javascript","remark","remark-lint","lint","rule"],"install":[{"cmd":"npm install remark-lint-spaces-around-number","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-spaces-around-number","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-spaces-around-number","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required to run lint rules","package":"remark-lint","optional":false},{"reason":"Underlying unified ecosystem required by remark","package":"unified","optional":false}],"imports":[{"note":"Package has a default export; named destructuring will fail.","wrong":"const { remarkLintSpacesAroundNumber } = require('remark-lint-spaces-around-number')","symbol":"default","correct":"import remarkLintSpacesAroundNumber from 'remark-lint-spaces-around-number'"},{"note":"ESM import preferred; require may work but not guaranteed.","wrong":"var remark = require('remark')","symbol":"remark","correct":"import remark from 'remark'"},{"note":"remark-lint is default export; named import results in undefined.","wrong":"import { remarkLint } from 'remark-lint'","symbol":"remarkLint","correct":"import remarkLint from 'remark-lint'"}],"quickstart":{"code":"import remark from 'remark';\nimport remarkLint from 'remark-lint';\nimport remarkLintSpacesAroundNumber from 'remark-lint-spaces-around-number';\nimport report from 'vfile-reporter';\n\nremark()\n  .use(remarkLint)\n  .use(remarkLintSpacesAroundNumber)\n  .process('理财产品的收益是 4.0%左右。', (err, file) => {\n    console.error(report(err || file));\n  });\n// Output: 1:10-1:13 warning Should have space after \"4.0%\"","lang":"typescript","description":"Shows usage with remark API: process markdown and catch missing space between number and Chinese."},"warnings":[{"fix":"Ensure remark-lint is installed and used as a plugin before this one.","message":"Plugin only works with remark-lint and unified ecosystem","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use default import: import pkg from 'remark-lint-spaces-around-number'","message":"Default export; named import will yield undefined","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Upgrade to v0.1.0 or later which uses unified-lint-rule","message":"Incompatible with remark 13+ if using older plugin API","severity":"breaking","affected_versions":"<0.1.0"},{"fix":"Use import syntax","message":"Console usage via require('remark-lint-spaces-around-number') may stop working in future ESM-only releases","severity":"deprecated","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `import remarkLintSpacesAroundNumber from 'remark-lint-spaces-around-number'`","cause":"Named import of default-exported package","error":"TypeError: remarkLintSpacesAroundNumber is not a function"},{"fix":"Run `npm install remark-lint`","cause":"remark-lint not installed as a dependency","error":"Error: Cannot find module 'remark-lint'"},{"fix":"Add `remark-lint-spaces-around-number` as a plugin after `remark-lint`","cause":"Plugin not registered in remark config or .use() chain before remark-lint","error":"Warning: unknown rule \"spaces-around-number\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}