Registry / testing / broccoli-lint-remark

broccoli-lint-remark

JSON →
library1.1.0jsnpmunverified

Broccoli plugin that wraps remark-lint for linting Markdown files in a Broccoli build pipeline. Version 1.1.0 is the current stable release, with low release cadence. It differs from direct remark-lint usage by integrating into Broccoli's asset pipeline, allowing lint results to be generated as test output (QUnit or Mocha) or custom test generators. It accepts remark and unified-engine options, and supports .remarkrc configuration files.

npm install broccoli-lint-remark
INSTALL
IMPORT
SIG · BROCCOLI-LINT-REMA
B
broccoli-lint-remark
testingjavascriptv1.1.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.

LintRemark
const LintRemark = require('broccoli-lint-remark');
import LintRemark from 'broccoli-lint-remark';
CommonJS default export; no ESM wrapper provided.

Demonstrates usage of broccoli-lint-remark with a funnel source, mocha test generator, and remark-lint plugin configuration.

const LintRemark = require('broccoli-lint-remark'); const funnel = require('broccoli-funnel'); const inputNode = funnel('src/markdown'); const linted = new LintRemark(inputNode, { testGenerator: 'mocha', remark: { config: { plugins: ['remark-lint'] } } }); module.exports = linted;
Debug
Known issues
gotchaThe `testGenerator` option expects a string ('qunit' or 'mocha') or custom function. If omitted or set to null, no test output is generated, which may silently skip lint tests.
fix
Always set `testGenerator` to a supported string or provide a custom function.
affects: >=1.0.0
deprecatedThe `persist` option defaults to true, but persisting state may cause stale lint results across restarts. Some users expect false for fresh builds.
fix
Set `persist: false` if you want to force re-lint on every build.
affects: >=1.0.0
gotchaThe plugin does not expose a `lintTree` hook like other Broccoli lint plugins; it only works as a filter node that produces test output or passes through files.
fix
Use `broccoli-lint-remark` only for generating test assertions, not for full tree linting.
affects: >=1.0.0
gotchaIf using a custom `testGenerator` function, it must return a string. Returning null or undefined will cause an error.
fix
Ensure your custom testGenerator returns a valid test output string.
affects: >=1.0.0
gotchaThe `remark` options object is passed directly to unified-engine; not all remark-lint options may be accepted if unified-engine rejects them.
fix
Refer to unified-engine documentation for allowed options. If an option is ignored, consider using a .remarkrc configuration file.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'broccoli-lint-remark'
Package not installed locally.
fix
Run `npm install --save-dev broccoli-lint-remark`
TypeError: LintRemark is not a constructor
Using ES6 `import` instead of CommonJS `require`.
fix
Change to `const LintRemark = require('broccoli-lint-remark');`
Error: The testGenerator option must be a string or function.
Invalid or missing testGenerator value.
fix
Set `testGenerator: 'mocha'` (or 'qunit') or provide a custom function.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
remark-lintrequiredCore linting engine for Markdown files
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
broccoli-lint-remark — npm install broccoli-lint-remark · libregistry