Registry / testing / remark-lint-table-pipes

remark-lint-table-pipes

JSON →
library5.0.1jsnpmunverified

A remark-lint rule that warns when GFM table rows lack initial or final pipe delimiters. Current stable version is 5.0.1. This is an ESM-only package for Node.js 16+. It is part of the remark-lint ecosystem and included in the markdown-style-guide preset. Unlike other table lint rules that check alignment or cell padding, this rule specifically enforces that every row starts and ends with a pipe character, which is recommended by the markdown style guide and automatically fixed by remark-stringify.

npm install remark-lint-table-pipes
INSTALL
IMPORT
SIG · REMARK-LINT-TABLE-
R
remark-lint-table-pipes
testingjavascriptv5.0.1
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.

default
✓ import remarkLintTablePipes from 'remark-lint-table-pipes'
✗ const remarkLintTablePipes = require('remark-lint-table-pipes')
Package is ESM-only; require() will throw a MODULE_NOT_FOUND error.
remarkLintTablePipes
✓ import remarkLintTablePipes from 'remark-lint-table-pipes'
✗ import { remarkLintTablePipes } from 'remark-lint-table-pipes'
The package exports a default export, not a named export.
Unified
✓ import { unified } from 'unified'
✗ import unified from 'unified'
unified is a named export from the unified package.

Shows how to use the remark-lint-table-pipes rule programmatically with unified.

import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkStringify from 'remark-stringify'; import remarkLint from 'remark-lint'; import remarkLintTablePipes from 'remark-lint-table-pipes'; import { read } from 'to-vfile'; import { reporter } from 'vfile-reporter'; const file = await read('example.md'); await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintTablePipes) .use(remarkStringify) .process(file); console.error(reporter(file));
Debug
Known issues
breakingPackage is ESM-only since v3.0.0. require() will not work.
fix
Use import syntax or dynamic import(). If you must use CommonJS, pin to version 2.x.
affects: >=3.0.0
breakingThe rule now checks both opening and closing pipes. Previous versions only checked closing pipes.
fix
If you previously relied on the rule ignoring missing opening pipes, update your markdown to include pipes at both ends of each row.
affects: >=3.0.0
deprecatedThe option 'start' and 'end' have been removed. Now the rule always checks both.
fix
Remove any configuration that passes options; the rule no longer accepts options.
affects: >=3.0.0
gotchaThe rule only works if remark-gfm is loaded before remark-lint-table-pipes in the unified pipeline.
fix
Ensure you use .use(remarkGfm) before .use(remarkLintTablePipes).
affects: all
gotchaTables without header separators (e.g., only one row) are not detected as tables by remark-gfm, so the rule will not warn.
fix
Always include a header separator row for tables to be parsed correctly.
affects: all
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/remark-lint-table-pipes/index.js from /path/to/your/file.js not supported.
Package is ESM-only and cannot be imported via require().
fix
Change to import statement: import remarkLintTablePipes from 'remark-lint-table-pipes'
SyntaxError: The requested module 'remark-lint-table-pipes' does not provide an export named 'remarkLintTablePipes'
Trying to use a named import from a package that only has a default export.
fix
Use default import: import remarkLintTablePipes from 'remark-lint-table-pipes'
TypeError: remarkLintTablePipes is not a function
The imported value is not the plugin but an object with a default property (common when mixing CJS/ESM).
fix
Use default import: import remarkLintTablePipes from 'remark-lint-table-pipes' (not require).
Upgrade
Version history
5.0.1latest on npm
Audit
Dependencies
remark-lintoptionalRequired as a peer dependency for lint rule integration
remark-gfmoptionalRequired to parse GFM tables; without it, the rule has no effect
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-table-pipes — npm install remark-lint-table-pipes · libregistry