1.0.2 • Published 2 years ago
md-spell v1.0.2
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.