standard-readme-preset

raw JSON →
1.0.9 verified Fri May 01 auth: no javascript

A remark preset to configure remark-lint with rules that enforce the standard-readme specification. Version 1.0.9 is the current stable release, with low release cadence. It includes custom rules for file extensions, required sections, section ordering, and heading validation. Differentiator: integrates directly with remark-lint to automatically check README compliance, reducing manual review effort. Dependencies: Node.js >=10. Install via npm and use CLI or API.

error Cannot find module 'remark-lint'
cause remark-lint is missing from node_modules.
fix
npm install remark-lint
error Error: Cannot find preset 'standard-readme-preset'
cause Preset not installed or incorrectly referenced.
fix
npm install standard-readme-preset
error TypeError: preset is not a function
cause Using an ESM import without default export handling in older remark versions.
fix
Use default import: import preset from 'standard-readme-preset' or CommonJS require.
gotcha Preset requires remark-lint to be installed; not a standalone plugin.
fix Ensure remark and remark-lint are in your dependencies.
breaking Deprecated support for Node <10.
fix Upgrade Node to version 10 or later.
deprecated Greenkeeper badge is obsolete; CI integration may be outdated.
fix Switch to Renovate or manually update dependencies.
gotcha Custom rules like file-extension and require-sections are not part of core remark-lint.
fix Refer to https://github.com/RichardLitt/standard-readme-preset for rule specifics.
npm install standard-readme-preset
yarn add standard-readme-preset
pnpm add standard-readme-preset

Shows how to lint a README using the preset via CLI and API with CommonJS.

// Install: npm install standard-readme-preset remark-cli
// CLI usage with default rules
remark -u standard-readme-preset README.md

// API usage
const remark = require('remark');
const preset = require('standard-readme-preset');
const vfile = require('to-vfile');

remark()
  .use(preset)
  .process(vfile.readSync('README.md'), (err, file) => {
    if (err) throw err;
    console.log(String(file));
  });