md-spell

1.0.2 • Public • Published

md-spell

Spellchecker for markdown files loosely based on the work of lukeapage and using the same Hunspell dictionary files. This implementation is minimalist, but it provides what we need to spell check our markdown files in the pipeline before they get published.

Installation

npm install md-spell -g

Usage from CLI

mdspell -f docs

Options

mdspell --help
Usage: mdspell [options]

Options:
  -n, --ignore-numbers               Ignore numbers
  -e, --exceptions <exception-file>  Line separated list of words to ignore (default: ".exceptions")
  -f, --folder <folder>              Folder to scan
  -a, --ignore-acronyms              Ignore acronyms
  -r, --report                       Readiness report
  -h, --help                         display help for command

Usage as a library

const spellCheckFile = require('md-spell');
const exceptions = ['abracadabra','mycompanyname'];
const ignoreNumbers = true;
const ignoreAcronyms = true;

let errors = spellCheckFile(fileName,ignoreNumbers,ignoreAcronyms,exceptions);
console.log(errors);

You can look at bin/index.js for a more complete example.

Package Sidebar

Install

npm i md-spell

Weekly Downloads

34

Version

1.0.2

License

ISC

Unpacked Size

3.16 MB

Total Files

34

Last publish

Collaborators

  • felipep