{"id":26283,"library":"remark-lint-spaces-around-word","title":"remark-lint-spaces-around-word","description":"A remark-lint plugin that checks for missing spaces between English words and Chinese characters in Markdown files, following the chinese-document-style-guide. Version 0.1.2 is the latest and stable release, with no active development indicated. It is a niche tool specifically for bilingual (Chinese-English) document formatting, differentiating from general remark-lint rules by targeting a specific typographic convention. The plugin has low release cadence and is best used with remark-lint.","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-word","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-spaces-around-word","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-spaces-around-word","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"remark-lint is required as a dependency for the plugin to work; this plugin is a rule for remark-lint.","package":"remark-lint","optional":false},{"reason":"unified is required by remark ecosystem, but not a direct peer dependency; included for context.","package":"unified","optional":true}],"imports":[{"note":"This package exports a single function as default. Named import will yield undefined.","wrong":"import { remarkLintSpacesAroundWord } from 'remark-lint-spaces-around-word'","symbol":"default","correct":"import remarkLintSpacesAroundWord from 'remark-lint-spaces-around-word'"},{"note":"remark is ESM-only since v14. For CJS, use dynamic import or use older version.","wrong":"const remark = require('remark')","symbol":"remark","correct":"import remark from 'remark'"},{"note":"In CJS environments, this is the standard way to import. No wrong pattern commonly observed.","wrong":"","symbol":"require (CommonJS)","correct":"const remarkLintSpacesAroundWord = require('remark-lint-spaces-around-word')"}],"quickstart":{"code":"import { readSync } from 'fs';\nimport { remark } from 'remark';\nimport remarkLint from 'remark-lint';\nimport remarkLintSpacesAroundWord from 'remark-lint-spaces-around-word';\nimport { reporter } from 'vfile-reporter';\n\nconst file = readSync('invalid.md', 'utf8');\nconst result = remark()\n  .use(remarkLint)\n  .use(remarkLintSpacesAroundWord)\n  .processSync(file);\n\nconsole.error(reporter(result));","lang":"javascript","description":"Demonstrates how to programmatically use remark-lint-spaces-around-word to lint a Markdown file, showing the process of reading a file, running the plugin, and outputting lint messages."},"warnings":[{"fix":"Ensure the English word has Chinese characters on both sides; otherwise the rule may not trigger.","message":"Plugin only detects missing spaces when English word is surrounded by Chinese characters, not the reverse or other languages.","severity":"gotcha","affected_versions":"all"},{"fix":"Manually review warnings; consider additional processing for punctuation.","message":"The plugin does not handle punctuation boundaries; e.g., '中文API。' will warn because of missing space before 'API' even though period follows.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install remark-lint-spaces-around-word' in your project.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'remark-lint-spaces-around-word'"},{"fix":"Use default import: import remarkLintSpacesAroundWord from 'remark-lint-spaces-around-word'","cause":"Using named import instead of default import.","error":"TypeError: Cannot read properties of undefined (reading 'SpacesAroundWord')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}