{"id":26230,"library":"remark-lint-match-punctuation","title":"remark-lint-match-punctuation","description":"A remark-lint rule that warns when paired punctuation marks (e.g., parentheses, quotation marks, brackets) are not properly matched. Version 0.2.1 is the latest release, with no frequent updates. It focuses on non-ASCII pairs like Chinese quotation marks and angle quotes. Unlike general remark-lint rules, this plugin specifically targets punctuation mismatches that are not covered by standard linting.","status":"active","version":"0.2.1","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-match-punctuation","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-match-punctuation","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-match-punctuation","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency needed to register the rule","package":"remark-lint","optional":false}],"imports":[{"note":"Default export; CJS require also works but ESM is preferred for new code.","wrong":"const remarkLintMatchPunctuation = require('remark-lint-match-punctuation')","symbol":"remarkLintMatchPunctuation","correct":"import remarkLintMatchPunctuation from 'remark-lint-match-punctuation'"},{"note":"Options are passed as an array of strings, each with left and right character.","symbol":"plugin options","correct":"remark().use(remarkLintMatchPunctuation, ['（）'])"},{"note":"In configuration files, the plugin name is a key; options are the value. Array options must be wrapped in an extra array: [\"（）\"] becomes [\"remark-lint-match-punctuation\", [\"（）\"]].","wrong":"\"remark-lint-match-punctuation\": [\"（）\"]","symbol":"remarkConfig","correct":"\"remark-lint-match-punctuation\": true"}],"quickstart":{"code":"import { remark } from 'remark';\nimport remarkLint from 'remark-lint';\nimport remarkLintMatchPunctuation from 'remark-lint-match-punctuation';\nimport { readSync } from 'to-vfile';\nimport { reporter } from 'vfile-reporter';\n\nconst file = readSync('./readme.md');\nremark()\n  .use(remarkLint)\n  .use(remarkLintMatchPunctuation)\n  .process(file, (err, result) => {\n    console.error(reporter(err || result));\n  });","lang":"javascript","description":"Demonstrates using the plugin with remark programmatically to lint a markdown file for punctuation pair mismatches."},"warnings":[{"fix":"Pass custom pairs as an array of two-character strings to the plugin.","message":"The plugin only checks explicitly listed punctuation pairs. Custom characters may not be caught unless passed as options.","severity":"gotcha","affected_versions":"0.0.0 - 0.2.1"},{"fix":"Review changelog for any future updates.","message":"No breaking changes documented; handle with care.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"Use a custom markdown node walker to skip these cases, or combine with other remark plugins.","message":"The plugin does not ignore punctuation inside code blocks or inline code by default.","severity":"gotcha","affected_versions":"0.0.0 - 0.2.1"}],"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-match-punctuation`","cause":"Package not installed.","error":"Error: Cannot find module 'remark-lint-match-punctuation'"},{"fix":"Ensure the config has \"remark-lint-match-punctuation\": true and that remark-lint is also used.","cause":"Plugin not registered correctly in remark configuration.","error":"TypeError: Cannot read properties of undefined (reading 'match-punctuation')"},{"fix":"Pass options as an array of strings where each string is exactly two characters (left and right pair).","cause":"Options passed in wrong format.","error":"Invalid option for plugin remark-lint-match-punctuation: expected array of 2-character strings"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}