Registry / testing / grunt-markdownlint

grunt-markdownlint

JSON →
library3.1.6jsnpmunverified

Grunt plugin for markdownlint, a rule-based Markdown linter. Version 3.1.6 wraps markdownlint 0.26+. Integrates linting into Grunt build pipelines, supporting config files (JSON) or inline rules. Alternatives: direct markdownlint CLI or other Grunt linters. Active maintenance, monthly releases.

npm install grunt-markdownlint
INSTALL
IMPORT
SIG · GRUNT-MARKDOWNLINT
G
grunt-markdownlint
testingjavascriptv3.1.6
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.

grunt
grunt.loadNpmTasks('grunt-markdownlint'); grunt.initConfig({ markdownlint: { ... } });
require('grunt-markdownlint')(grunt);
Must use Grunt's loadNpmTasks, not direct require.
config
options: { config: { 'default': true, 'line-length': false } }
options: { rules: { ... } }
Use 'config' property, not 'rules'.
configFile
options: { config: grunt.file.readJSON('path/to/config.json') }
options: { configFile: 'path/to/config.json' }
Set config to parsed JSON object, not file path string.

Registers markdownlint task with inline config, runs on all markdown files excluding node_modules.

// Gruntfile.js module.exports = function(grunt) { grunt.loadNpmTasks('grunt-markdownlint'); grunt.initConfig({ markdownlint: { all: { options: { config: { 'default': true, 'line-length': false, 'no-inline-html': false } }, src: ['README.md', '**/*.md', '!node_modules'] } } }); grunt.registerTask('lint', ['markdownlint']); };
Debug
Known issues
breakingMinimum Node.js version required: v13+ (since v3.0.0). Older versions cause runtime errors.
fix
Upgrade Node.js to v13 or later.
affects: >=3.0.0
gotchaConfig file must be parsed with grunt.file.readJSON, not a string path.
fix
Use grunt.file.readJSON('path/to/config.json').
affects: >=0.0.1
deprecatedThe 'rules' property in options is deprecated; use 'config' instead.
fix
Replace 'rules' with 'config' in task options.
affects: >=0.1.0
gotchaGlob patterns in src must not include directories without markdown files; task succeeds silently if no files matched.
fix
Verify glob patterns with grunt.file.expand.
affects: >=0.0.1
Errors
Common errors & fixes
Warning: Task "markdownlint" not found.
grunt.loadNpmTasks('grunt-markdownlint') not called or plugin not installed.
fix
Run `npm install --save-dev grunt-markdownlint` and add grunt.loadNpmTasks('grunt-markdownlint') to Gruntfile.
Fatal error: Cannot find module 'markdownlint'
markdownlint is a peer dependency not installed automatically.
fix
Run `npm install --save-dev markdownlint`.
Upgrade
Version history
3.1.6latest on npm
Audit
Dependencies
markdownlintrequiredCore linting engine
Agent activity
6 hits · last 30 days
node
6
Resources
grunt-markdownlint — npm install grunt-markdownlint · libregistry