yaspeller
Search tool typos in the text, files and websites.
Used API Yandex.Speller.
Installation
npm install yaspeller -g
Using CLI
yaspeller [options] <file-or-directory-or-link...>
Examples
yaspeller README.md
— search typos in the file.yaspeller ./texts/
— finding typos in files (xml, html, htm, txt, text, svg, md, wiki) in the folder.yaspeller http://www.yandex.ru/
— search typos in the page.yaspeller http://bem.info/sitemap.xml
— search typos at the addresses specified in the sitemap.xml.
Options
-f, --format <value>
Formats: plain
or html
.
Default: plain
.
-l, --lang <value>
Languages: en
, kk
, ru
or uk
.
Default: en,ru
.
--file-extensions <value>
Set file extensions to search for files in a folder.
Default: md,htm,html,txt,text,svg,wiki,xhtml,xml
.
--dictionary <file>
JSON file for own dictionary.
[
"someword1",
"someword2",
"someword3"
]
--by-words
Do not use a dictionary environment (context) during the scan.
This is useful in cases where the service is transmitted to the input of a list of individual words.
--find-repeat-words
Highlight repetitions of words, consecutive. For example, I flew to to to Cyprus
.
--flag-latin
Celebrate words, written in Latin, as erroneous.
--ignore-capitalization
Ignore the incorrect use of UPPERCASE / lowercase letters, for example, in the word moscow
.
--ignore-digits
Ignore words with numbers, such as avp17h4534
.
--ignore-latin
Ignore words, written in Latin, for example, madrid
.
--ignore-roman-numerals
Ignore Roman numerals I, II, III, ...
.
--ignore-uppercase
Ignore words written in capital letters.
--ignore-urls
Ignore Internet addresses, email addresses and filenames.
--max-requests <value>
Max count of requests at a time.
Default: 2
.
--no-colors
Clean output without colors.
--only-errors
Output only errors.
--debug
Debug mode.
Configuration
npm install yaspeller --save-dev
Add the text in package.json
/ scripts
:
"yaspeller": "./node_modules/.bin/yaspeller .",
To run the linter:
npm run yaspeller
Yaspeller is configured using .yaspellerrc
JSON file at the root of the project.
{
"excludeFiles": [
".git",
"yaspeller",
"node_modules",
"libs"
],
"format": "auto",
"lang": "ru",
"fileExtensions": [
"md",
"js",
"css"
],
"dictionary": [
"someword1"
]
}
MIT License