Registry / testing / eslint-markdown

eslint-markdown

JSON →
library0.6.1jsnpmunverified

An ESLint plugin for linting Markdown files, providing rules for consistent code style, list style, inline code style, no tabs, no URL trailing slashes, and more. Current stable version is 0.6.1, with active development on GitHub. It requires ESLint ^9.31.0 or ^10.0.0-rc.0 (ESLint flat config only). Unlike @eslint/markdown which parses MD for JS linting, this plugin lints the Markdown syntax itself. Release cadence is monthly with minor breaking changes on minor versions.

npm install eslint-markdown
INSTALL
IMPORT
SIG · ESLINT-MARKDOWN
E
eslint-markdown
testingjavascriptv0.6.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

eslint-markdown
import eslintMarkdown from 'eslint-markdown'
const eslintMarkdown = require('eslint-markdown')
ESM-only package. Requires ESLint flat config.
rules
import { rules } from 'eslint-markdown'
Access to individual rule definitions. Use only if you need to customize rule configuration.
configs
import { configs } from 'eslint-markdown'
import configs from 'eslint-markdown/configs'
Predefined flat configs: 'recommended' and 'stylistic'. Import from main entry.
plugin object
import eslintMarkdown from 'eslint-markdown'
import { default as eslintMarkdown } from 'eslint-markdown'
Default export is the plugin object with `rules` and `configs`. No named constructor.

Sets up eslint-markdown plugin with recommended config and custom rules in ESLint flat config.

// eslint.config.js (flat config only) import eslintMarkdown from 'eslint-markdown'; export default [ // Add Markdown linting rules eslintMarkdown.configs.recommended, { plugins: { 'eslint-markdown': eslintMarkdown }, files: ['**/*.md'], rules: { 'eslint-markdown/no-tab': 'error', 'eslint-markdown/consistent-code-style': ['warn', { style: 'fenced' }] } } ];
Debug
Known issues
breakingESLint flat config only (no .eslintrc). Requires ESLint ^9.31.0.
fix
Migrate to eslint.config.js flat config file.
affects: >=0.1.0
breakingPlugin renamed from 'eslint-plugin-mark' to 'eslint-markdown' in v0.1.0-canary.12.
fix
Replace import 'eslint-plugin-mark' with 'eslint-markdown' and update rule prefixes from 'mark/' to 'md/'.
affects: >=0.1.0-canary.12
breakingRule identifiers changed from 'mark/' to 'md/' (e.g., 'mark/no-tab' -> 'md/no-tab') in v0.1.0-canary.12.
fix
Update all rule references to use 'md/' prefix.
affects: >=0.1.0-canary.12
deprecatedThe option 'consistent-code-style' rule's previous options may be deprecated; check migration guide.
fix
Review rule configuration options; defaults may have changed.
affects: >=0.5.0
gotchaPeer dependency on ESLint v10 pre-release may not be compatible with stable ESLint v9.
fix
Ensure ESLint version matches peer requirement: ^9.31.0 or ^10.0.0-rc.0.
affects: >=0.3.0
gotchaNode.js engine requirement: ^20.19.0 || ^22.13.0 || >=24.0.0. Older versions not supported.
fix
Upgrade Node.js to a supported version.
affects: >=0.1.0-canary.11
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module from not supported.
Using require() to load an ESM-only package.
fix
Use import statement instead of require(), or set type: 'module' in package.json.
ESLint couldn't find the plugin 'eslint-markdown'.
Missing import or incorrect config format in eslint.config.js.
fix
Ensure you import eslintMarkdown from 'eslint-markdown' and include it in the config array.
Configuration for rule 'md/no-tab' is invalid.
Using old rule prefix 'mark/' instead of 'md/'.
fix
Replace 'mark/' with 'md/' in rule names.
Cannot find module 'eslint-markdown'
Package not installed or missing peer dependency eslint.
fix
Run npm install eslint-markdown --save-dev and ensure eslint ^9.31.0 is installed.
Upgrade
Version history
0.6.1latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: ESLint v9.31+ or v10 beta
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-markdown — npm install eslint-markdown · libregistry