Registry / testing / remark-lint-write-good

remark-lint-write-good

JSON →
library1.2.0jsnpmunverified

A remark-lint rule that integrates the write-good library to check Markdown files for stylistic issues such as weasel words, passive voice, and clichés. Version 1.2.0 is stable without a defined release cadence. It differs from similar linting tools by leveraging write-good's natural language suggestions focused on plain English writing style, offering configurable checks and a whitelist for suppressing warnings on specific terms. Requires remark-lint as a peer dependency and is part of the unified/remark ecosystem.

npm install remark-lint-write-good
INSTALL
IMPORT
SIG · REMARK-LINT-WRITE-
R
remark-lint-write-good
testingjavascriptv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

remarkLintWriteGood (rule function)
import remarkLintWriteGood from 'remark-lint-write-good'
const remarkLintWriteGood = require('remark-lint-write-good')
The rule is commonly used via remark-stringify configuration, not directly imported. If importing, use default ES import.
Plugin as array in remark configuration
['remark-lint-write-good', ['warn', { passive: false }]]
['remark-lint-write-good', { passive: false }]
Options must be wrapped in an array as the second element of the plugin tuple in unified configuration.
Whitelist option
['remark-lint-write-good', ['warn', { whitelist: ['read-only'] }]]
['remark-lint-write-good', ['warn', { whitelist: 'read-only' }]]
The whitelist property expects an array of strings, not a single string.

Creates a remark processor with remark-lint and the write-good plugin, then processes a Markdown file and logs lint messages.

import { readSync } from 'to-vfile'; import { remark } from 'remark'; import remarkLint from 'remark-lint'; import remarkLintWriteGood from 'remark-lint-write-good'; const file = readSync('example.md'); remark() .use(remarkLint) .use(remarkLintWriteGood, ['warn', { passive: false, whitelist: ['read-only'] }]) .process(file) .then((result) => { console.log(result.messages); });
Debug
Known issues
gotchaOptions must be provided as an array: [severity, options].
fix
Use ['remark-lint-write-good', ['warn', { ... }]] in config.
affects: >=1.0.0
gotchawhitelist option must be an array of strings.
fix
Set whitelist to an array, e.g., whitelist: ['read-only'].
affects: >=1.0.0
breakingThe package may require write-good version 1.x, which has its own breaking changes.
fix
Use write-good version ^1.0.0 or compatible.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'write-good'
Missing write-good dependency.
fix
Run npm install write-good --save or add it to dependencies.
TypeError: The 'compilation' argument must be of type function. Received an instance of Array
Incorrect configuration: options not wrapped in an array.
fix
Change configuration to ['remark-lint-write-good', ['warn', { ... }]].
Error: Expected a whitelist array (not a string) at ...
whitelist option passed as a string instead of an array.
fix
Set whitelist: ['read-only'] (an array).
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies
write-goodrequiredCore dependency that provides the natural language checking logic for stylistic issues.
remark-lintrequiredPeer dependency: this package is a plugin for remark-lint and expects it to be installed.
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-write-good — npm install remark-lint-write-good · libregistry