Skip to content

VSCode Extension to lint Markdown with Remark and Retext

License

Notifications You must be signed in to change notification settings

drewbourne/vscode-remark-lint

Repository files navigation

vscode-remark-lint README

Features

Use Unified, Remark, and Retext plugins to lint Markdown.

Plugins are available to:

  • Check spelling
  • Check readability
  • Avoid repeated words
  • Avoid profanity
  • Avoid passive words / phrases

Recommendations

Use Prettier and the Prettier VS Code extension for format Markdown.

Requirements

This extension requires packages to be installed locally, and a .remarkrc.js (or similar) configuration file in same folder hierarchy as the .md Markdown files that will be linted.

Example configuration

Install packages:

npm install --save unified remark-frontmatter remark-retext retext-english retext-syntax-urls retext-spell dictionary-en-us retext-sentence-spacing retext-repeated-words retext-usage remark-preset-lint-consistent remark-preset-lint-recommended remark-preset-lint-markdown-style-guide

Create an .remarkrc.js with settings and plugins:

// .remarkrc.js
exports.plugins = [
  require('remark-frontmatter'),
  [
    require('remark-retext'),
    require('unified')().use({
      plugins: [
        require('retext-english'),
        require('retext-syntax-urls'),
        [require('retext-spell'), require('dictionary-en-us')],
        [require('retext-sentence-spacing'), { preferred: 1 }],
        require('retext-repeated-words'),
        require('retext-usage'),
      ],
    }),
  ],
  require('remark-preset-lint-consistent'),
  require('remark-preset-lint-recommended'),
  require('remark-preset-lint-markdown-style-guide'),
];

Release Notes

1.0.0

  • First Release

Links


LICENSE

MIT

About

VSCode Extension to lint Markdown with Remark and Retext

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published