Registry /
testing / eslint-plugin-markdown-preferences
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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
markdownPreferences
✓ import markdownPreferences from 'eslint-plugin-markdown-preferences'
✗ const markdownPreferences = require('eslint-plugin-markdown-preferences')
ESM-only; requires Node.js >=20.19.0 or >=22.12.0 or >=24.0.0. Use default import in flat config.
configs.recommended
✓ markdownPreferences.configs.recommended
✗ require('eslint-plugin-markdown-preferences').configs.recommended
Access via the default import object. The recommended config enables a curated set of rules.
configs.standard
✓ markdownPreferences.configs.standard
Stricter opinionated config for style enforcement. Override specific rules as needed.
Demonstrates flat config setup for ESLint v9+ with recommended and custom rules.
// eslint.config.js
import { defineConfig } from 'eslint/config';
import markdown from '@eslint/markdown';
import markdownPreferences from 'eslint-plugin-markdown-preferences';
export default defineConfig([
// Enable ESLint's built-in Markdown processor
markdown.configs.recommended,
// Enable the plugin's recommended config
markdownPreferences.configs.recommended,
{
files: ['**/*.md', '*.md'],
rules: {
// Enforce sentence case headings
'markdown-preferences/heading-casing': ['error', 'sentence-case'],
// Disallow trailing punctuation in headings
'markdown-preferences/no-heading-trailing-punctuation': 'error',
// Require consistent ordered list markers
'markdown-preferences/ordered-list-marker-sequence': ['error', { increment: 1 }],
// Enforce max line length
'markdown-preferences/max-len': ['error', { code: 80 }],
// Prefer reference links over inline URLs
'markdown-preferences/prefer-linked-words': 'warn',
},
},
]);
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-markdown-preferences'
Missing npm installation or incorrect import path.
fixRun 'npm install --save-dev eslint-plugin-markdown-preferences' and ensure package.json includes it.
TypeError: markdownPreferences is not a function
Using CommonJS require() instead of ESM import.
fixUse 'import markdownPreferences from "eslint-plugin-markdown-preferences"' in eslint.config.js.
Error: 'markdown-preferences/unknown-rule' was not found
Rule name misspelled or does not exist.
fixCheck the rule list at https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ for valid rule names.
Parsing error: The keyword 'import' is reserved
Using ESM import in a CommonJS file without correct configuration.
fixAdd 'type': 'module' to package.json or rename file to .mjs extension.
Audit
Dependencies
@eslint/markdownrequiredPeer dependency; required for ESLint to parse Markdown files. Versions ^7.4.0 or ^8.0.0 supported.
eslintrequiredPeer dependency; >=9.0.0 required for flat config support.