{"id":26280,"library":"remark-lint-prohibited-strings","title":"remark-lint-prohibited-strings","description":"A remark-lint plugin to prohibit specified strings in markdown files (excluding code blocks). Version 4.0.0 is current and stable, with infrequent releases. It supports case-sensitive and case-insensitive matching, regular expressions, capture group replacement, and optional exclusion of matches adjacent to specified characters. Compared to alternatives, it is lightweight and simple, focused solely on string prohibition without additional linting rules.","status":"active","version":"4.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/Trott/remark-lint-prohibited-strings","tags":["javascript","remark","lint","markdown","md","strings"],"install":[{"cmd":"npm install remark-lint-prohibited-strings","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-prohibited-strings","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-prohibited-strings","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package is a plugin for remark-lint; the linting infrastructure is required.","package":"remark-lint","optional":false}],"imports":[{"note":"Default import only; named export does not exist.","wrong":"import { remarkLintProhibitedStrings } from 'remark-lint-prohibited-strings'","symbol":"remarkLintProhibitedStrings","correct":"import remarkLintProhibitedStrings from 'remark-lint-prohibited-strings'"}],"quickstart":{"code":"import { remark } from 'remark';\nimport remarkLint from 'remark-lint';\nimport remarkLintProhibitedStrings from 'remark-lint-prohibited-strings';\n\nconst file = await remark()\n  .use(remarkLint)\n  .use(remarkLintProhibitedStrings, [\n    { no: 'Javascript', yes: 'JavaScript' },\n    { no: 'Github', yes: 'GitHub' }\n  ])\n  .process('# Hello Javascript world');\n\nconsole.log(file.messages);\n// Output: [1:10-1:19: Replace \"Javascript\" with \"JavaScript\" (prohibited-strings)]","lang":"javascript","description":"Shows setup of remark-lint with prohibited-strings plugin and linting a simple markdown file."},"warnings":[{"fix":"Use additional linting rules or preprocess the file if code block linting is required.","message":"The plugin does not check inside fenced code blocks or inline code spans, which may cause missed violations if prohibited strings appear in code examples.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure regex strings are escaped for JavaScript string literal, e.g., '[Rr][Ff][Cc](\\\\d+)'.","message":"Regular expressions in the `no` field are provided as strings; they must be escaped properly (e.g., double backslashes for digit groups).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Explicitly include `no` with the exact case you want to match if case-insensitive behavior is not desired.","message":"If `no` is omitted, the prohibited string is derived from `yes` but with case-insensitive matching; any case variation of `yes` will be flagged.","severity":"gotcha","affected_versions":">=1.0.0"}],"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-prohibited-strings` and use the correct import as shown in the quickstart.","cause":"The package is installed but not registered in the dependencies, or the import path is incorrect.","error":"Error: Cannot find module 'remark-lint-prohibited-strings'"},{"fix":"Ensure the second argument to .use() is an array of rule objects, e.g., [ { no: 'foo', yes: 'bar' } ].","cause":"Configuration passed to the plugin is not an array or is malformed.","error":"TypeError: Cannot read properties of undefined (reading 'some')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}