Registry / testing / remark-lint-no-table-indentation

remark-lint-no-table-indentation

JSON →
library5.0.1jsnpmunverified

remark-lint rule to warn when GFM tables are indented. This package is part of the remark-lint ecosystem and checks that tables are not indented. It is ESM-only (requires Node.js 16+ and `remark-gfm` for GFM table support). The rule has no options and recommends no indentation for tables. It is included in the `remark-preset-lint-markdown-style-guide` preset. The plugin is a `Transformer` from unified. Current stable version is 5.0.1 released as part of the remark-lint monorepo. Release cadence is irregular, tied to the monorepo maintenance. Key differentiator: it only checks table indentation, making it lightweight and focused.

npm install remark-lint-no-table-indentation
INSTALL
IMPORT
SIG · REMARK-LINT-NO-TAB
R
remark-lint-no-table-indentation
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.

remarkLintNoTableIndentation
✓ import remarkLintNoTableIndentation from 'remark-lint-no-table-indentation'
✗ const remarkLintNoTableIndentation = require('remark-lint-no-table-indentation')
ESM-only since v5; CommonJS require is not supported.

This shows how to use the rule in a unified pipeline to lint a markdown string for indented GFM tables.

import {unified} from 'unified' import remarkParse from 'remark-parse' import remarkStringify from 'remark-stringify' import remarkLint from 'remark-lint' import remarkLintNoTableIndentation from 'remark-lint-no-table-indentation' import {reporter} from 'vfile-reporter' const file = await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintNoTableIndentation) .use(remarkStringify) .process('# Hello\n\n | a | b |\n | - | - |\n | 1 | 2 |\n') console.error(reporter(file))
remark --version
Debug
Known issues
breakingPackage is ESM-only. CommonJS require will throw an error.
fix
Convert to ESM with import syntax, or use dynamic import().
affects: >=5.0.0
deprecatedThis rule is part of remark-lint and only works with unified's async transformer model.
fix
Ensure you use async/await or handle promises.
affects: all
gotchaThe rule requires remark-gfm to be used if you have GFM tables, otherwise no table AST nodes are generated.
fix
Install remark-gfm and add it to the unified pipeline before this rule.
affects: all
gotchaThe rule has no options. Misconfigured options are silently ignored.
fix
Do not pass any options; the rule accepts none.
affects: all
Errors
Common errors & fixes
Cannot find module 'remark-lint-no-table-indentation'
Package not installed or incorrect import path.
fix
Run `npm install remark-lint-no-table-indentation` and ensure you are using ESM import.
SyntaxError: Unexpected token '?'
Using CommonJS require with an ESM-only package.
fix
Use ESM with `import` or `import()` dynamic import.
Upgrade
Version history
5.0.1latest on npm
Audit
Dependencies
remark-lintrequiredThe rule is a plugin for remark-lint; it must be used with remark-lint.
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-no-table-indentation — npm install remark-lint-no-table-indentation · libregistry