Registry / testing / remark-lint-no-hidden-table-cell

remark-lint-no-hidden-table-cell

JSON →
library1.0.1jsnpmunverified

remark-lint rule to warn for superfluous table cells that are hidden because a row has more cells than the header row. Current stable version: 1.0.1. Part of the remark-lint monorepo maintained by unified collective. Released in 2024. Supports GFM tables via remark-gfm. ESM-only, ships TypeScript types. Unlike general table linting, this rule specifically catches rows with extra cells that are not rendered.

npm install remark-lint-no-hidden-table-cell
INSTALL
IMPORT
SIG · REMARK-LINT-NO-HID
R
remark-lint-no-hidden-table-cell
testingjavascriptv1.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.

remarkLintNoHiddenTableCell
import remarkLintNoHiddenTableCell from 'remark-lint-no-hidden-table-cell'
const { remarkLintNoHiddenTableCell } = require('remark-lint-no-hidden-table-cell')
ESM-only since v1.0.0; no named export, default export only.
remarkLint
import remarkLint from 'remark-lint'
import { remarkLint } from 'remark-lint'
remark-lint also has a default export; named export does not exist.
remarkParse
import remarkParse from 'remark-parse'
const remarkParse = require('remark-parse')
ESM-only. Used for parsing markdown.

Sets up a unified pipeline to lint a markdown file for hidden table cells, using GFM support.

import remarkLint from 'remark-lint' import remarkLintNoHiddenTableCell from 'remark-lint-no-hidden-table-cell' import remarkParse from 'remark-parse' import remarkStringify from 'remark-stringify' import remarkGfm from 'remark-gfm' import { read } from 'to-vfile' import { unified } from 'unified' import { reporter } from 'vfile-reporter' const file = await read('example.md') await unified() .use(remarkParse) .use(remarkGfm) .use(remarkLint) .use(remarkLintNoHiddenTableCell) .use(remarkStringify) .process(file) console.error(reporter(file))
Debug
Known issues
breakingESM-only package: require() will throw ERR_REQUIRE_ESM.
fix
Use import instead of require. Set type: 'module' in package.json.
affects: >=1.0.0
breakingRequires Node.js 16+ as of version 1.
fix
Upgrade Node.js to version 16 or later.
affects: >=1.0.0
gotchaDoes not work without remark-gfm for tables using GitHub Flavored Markdown.
fix
Install remark-gfm and add .use(remarkGfm) before linting.
affects: >=1.0.0
gotchaThe plugin has no options; attempting to pass options will be silently ignored.
fix
Do not pass any parameters. Use as .use(remarkLintNoHiddenTableCell).
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module ... not supported
Using CommonJS require() to import an ESM-only module.
fix
Switch to import statement or use dynamic import().
Could not parse table: unrecognized table row structure
Missing remark-gfm plugin to parse GFM tables.
fix
Install remark-gfm and add .use(remarkGfm) to the pipeline.
Cannot find module 'remark-lint'
remark-lint is not installed in the project.
fix
Run npm install remark-lint.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
unifiedrequiredunified ecosystem core; required to use remark plugins
remark-lintrequiredrequired to run lint rules; provides the lint infrastructure
remark-gfmoptionalrequired for GFM table support; needed to parse tables correctly
Agent activity
2 hits · last 30 days
node
2
Resources
remark-lint-no-hidden-table-cell — npm install remark-lint-no-hidden-table-cell · libregistry