Registry / testing / remark-lint-no-tabs

remark-lint-no-tabs

JSON →
library4.0.1jsnpmunverified

Remark-lint rule to warn when hard tabs are used in Markdown instead of spaces. Current stable version is 4.0.1. It is part of the remark-lint monorepo, which is actively maintained with frequent releases. This rule is specific to Markdown, where tabs can cause unexpected rendering due to the hardcoded tab size of 4, making it distinct from general linters. It works with unified and remark-stringify, which automatically uses spaces. No options needed.

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

remarkLintNoTabs
import remarkLintNoTabs from 'remark-lint-no-tabs'
const remarkLintNoTabs = require('remark-lint-no-tabs')
Package is ESM-only since v3. Default export is the plugin function.
remarkLint
import remarkLint from 'remark-lint'
import { remarkLint } from 'remark-lint'
remark-lint is a default export, not a named export.
unified
import { unified } from 'unified'
import unified from 'unified'
unified is a named export since v9. Default export is deprecated.

Sets up a unified pipeline with remark, parses a Markdown file, lints for tabs, and reports any issues.

import remarkLint from 'remark-lint' import remarkLintNoTabs from 'remark-lint-no-tabs' import remarkParse from 'remark-parse' import remarkStringify from 'remark-stringify' 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(remarkLint) .use(remarkLintNoTabs) .use(remarkStringify) .process(file) console.error(reporter(file))
Debug
Known issues
breakingPackage is ESM-only since v3. require() will throw ERR_REQUIRE_ESM.
fix
Use import instead of require(). If using CommonJS, use dynamic import() or upgrade to Node.js 16+.
affects: >=3.0.0
deprecatedThe previous version 2.x used a different API signature. The plugin no longer accepts options.
fix
Remove any options passed to remarkLintNoTabs(). In v3+, the rule has no options.
affects: 2.x
gotchaThis rule only checks for hard tab characters (U+0009). It does not check for leading spaces or mixed indentation.
fix
Combine with other rules like remark-lint-no-mixed-spaces-and-tabs if needed.
affects: all
breakingThe package no longer exports a namespace. Default export is the plugin function.
fix
Use default import: import remarkLintNoTabs from 'remark-lint-no-tabs'
affects: >=3.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module not supported
Using require() to load an ESM-only package.
fix
Change to import statement or use dynamic import: const remarkLintNoTabs = await import('remark-lint-no-tabs')
Cannot find module 'remark-lint-no-tabs'
Package not installed or module path incorrect.
fix
Run npm install remark-lint-no-tabs in your project directory.
TypeError: remarkLintNoTabs is not a function
Importing as named export instead of default export.
fix
Use: import remarkLintNoTabs from 'remark-lint-no-tabs'
Upgrade
Version history
4.0.1latest on npm
Audit
Dependencies
unifiedrequiredCore unified ecosystem package for processing Markdown
remark-lintrequiredRequired to enable linting in the unified pipeline
remark-parserequiredRequired to parse Markdown into an AST
remark-stringifyoptionalOften used alongside for consistency, though not strictly required for linting
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-no-tabs — npm install remark-lint-no-tabs · libregistry