A textlint rule for spelling of languages as much as possible
Install with npm:
npm install textlint-rule-spelling dictionary-en # or dictionary-fr, ...
The dictionaries are available at wooorm/dictionaries
.textlintrc
(Recommended){
"rules": {
"spelling": {
"language": "en",
"skipPatterns": ["JavaScript"],
"wordDefinitionRegexp": "/[\\w']+/g",
"suggestCorrections": true,
}
}
}
Optional. Default value is en
and defines the suffix of the dictionary to look for. Example: en
means lookup dictionary-en
which you should have installed with npm.
Optional. This can be a mix of strings and regular expressions. Normal words like "npm"
will be transformed t a RegExp of format /npm/g
. But you can also enter a RegExp string directly like: "/\\bnpm\\b/g"
if you want to only match the full word.
Optional. You should override this if you notice an issue for your language. The default works for en.
/[\w']+/g
Optional(Default), disabling this removes word suggestions and quick fixes, but you gain an order of magnitude speed improvement. Mostly useful for live feedback loops.
textlint --rule spelling README.md
Builds source codes for publish to the lib
folder.
You can write ES2015+ source codes in src/
folder.
npm run build
Run test code in test
folder.
Test textlint rule by textlint-tester.
npm test
GPL-3.0-or-later © TANIGUCHI Masaya