Awesome Open Source
Awesome Open Source


NPM version NPM Downloads Coverage Status Dependency Status

This README is also available in Russian.

Search tool typos in the text, files and websites.

Used API Yandex.Speller.



npm install yaspeller -g

Using CLI

yaspeller [options] <file-or-directory-or-link...>

Using with pre-commit

Add this to your .pre-commit-config.yaml:

- repo:
  rev: '' # Use the sha / tag you want to point at
    - id: yaspeller


  • yaspeller โ€” search typos in the file.
  • yaspeller "*.md" โ€” node glob syntax for Windows.
  • yaspeller -e ".md,.html,.txt" ./texts/ โ€” finding typos in files in the folder.
  • yaspeller โ€” search typos in the page.
  • yaspeller โ€” search typos at the addresses specified in the sitemap.xml.
  • echo "Hello, world!" | yaspeller --stdin
  • echo "Hello, world!" | yaspeller --stdin --stdin-filename hello.txt


-f, --format <value>

Formats: plain, html, markdown or auto.
Default: auto.

-l, --lang <value>

Languages: en, ru or uk.
Default: en,ru.

-c, --config <path>

Configuration file path.

-e, --file-extensions <value>

Set file extensions to search for files in a folder.
Example: .md,.htm,.txt.

--dictionary <file>

JSON file for own dictionary.

    "someword1", // someword1 = someword1 and Someword1
    "Someword2", // Someword2 = Someword2

Regular expressions are supported:

    "unknown(W|w)ord[12]?", // unknown(W|w)ord[12]? = unknown(W|w)ord[12]? and Unknown(W|w)ord[12]?
    "Unknown(W|w)ord[34]?" // Unknown(W|w)ord[34]? = Unknown(W|w)ord[34]?

yaspeller --dictionary my_dict.json .
yaspeller --dictionary my_dict.json:my_dict2.json .

--report <type>

Set type of report: console, html, markdown or json.
Default: console
Example: console,html,custom_report.js


Check the correctness of using the letter โ€œะโ€ (Yo) in Russian texts.


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.


Highlight repetitions of words, consecutive. For example, I flew to to to Cyprus.


Flag words, written in Latin, as erroneous.

--ignore-tags <tags>

Ignore HTML tags.
Default: code,kbd,object,samp,script,style,var
Option to formats html andmarkdown.

--ignore-text <regexp>

Remove the text from the scan using regular expressions.


Ignore the incorrect use of UPPERCASE / lowercase letters, for example, in the word moscow.


Ignore words with numbers, such as avp17h4534.


Ignore words, written in Latin, for example, madrid.


Ignore Roman numerals I, II, III, ....


Ignore words written in capital letters.


Ignore Internet addresses, email addresses and filenames.

--max-requests <value>

Max count of requests in parallel.
Default: 2.


Clean output without colors.


Output only errors.


Process files on <STDIN>. Default: false

--stdin-filename <file>

Specify filename to process <STDIN> as. Used in reports.


Debug mode.


npm install yaspeller --save-dev

Add the text in package.json / scripts:
"yaspeller": "yaspeller .",

To run the linter:
npm run yaspeller

yaspeller is configured using JSON file at the root of the project:

  • .yaspellerrc
  • .yaspellerrc.js
  • .yaspellerrc.json
  • .yaspeller.json
  • package.json, field yaspeller
  "excludeFiles": [
  "lang": "ru",
  "fileExtensions": [
  "dictionary": [

Advanced example:

  "excludeFiles": [
  "format": "html",
  "lang": "en",
  "fileExtensions": [
  "report": ["console", "html"],
  "dictionary": [
    // JSON comments
    "someword1", // someword1 = someword1 and Someword1
    "Someword2", // Someword2 = Someword2
    "some(w|W)ord[23]", // some(w|W)ord[23] = some(w|W)ord[23] and Some(w|W)ord[23]
    "Some(w|W)ord" // Some(w|W)ord = Some(w|W)ord
  "ignoreText": [
    "<php\?[^]*?\?>", // Shortly
    ["<php\?[^]*?\?>", "g"] // Longly
  "ignoreTags": ["code", "script"],
  "ignoreUrls": true,
  "findRepeatWords": true,
  "maxRequests": 5
Propertyย  Type Details
format String --format
lang String --lang
excludeFiles Array
fileExtensions Array --file-extension
dictionary Array --dictionary
report Array --report
checkYo Boolean --check-yo
byWords Boolean --by-words
findRepeatWords Boolean --find-repeat-words
flagLatin Boolean --flag-latin
ignoreTags Array --ignore-tags
ignoreText Array --ignore-text
ignoreCapitalization Boolean --ignore-capitalization
ignoreDigits Boolean --ignore-digits
ignoreLatin Boolean --ignore-latin
ignoreRomanNumerals Boolean --ignore-roman-numerals
ignoreUppercase Boolean --ignore-uppercase
ignoreUrls Boolean --ignore-urls
maxRequests Number --max-requests

Ignore text from checking

Ignore a line

var re = /a-z/; // yaspeller ignore
var re = /a-z/; /* yaspeller ignore */
<span>a-z</span> <!-- yaspeller ignore -->

Ignore a block

/* yaspeller ignore:start */
var reUpper = /A-Z/,
    reLower = /a-z/;
/* yaspeller ignore:end */
<!-- yaspeller ignore:start -->
<!-- yaspeller ignore:end -->

Gulp plugin

var gulp = require('gulp'),
    run = require('gulp-run'); // npm install gulp-run --save-dev

gulp.task('yaspeller', function (cb) {
    run('./node_modules/.bin/yaspeller .').exec()
        .on('error', function (err) {
        .on('finish', cb);

Grunt plugin

module.exports = function(grunt) {
    grunt.loadNpmTasks('grunt-shell'); // npm install grunt-shell --save-dev
        shell: {
            yaspeller: {
                options: {stderr: false},
                command: './node_modules/.bin/yaspeller .'
    grunt.registerTask('lint', ['shell:yaspeller']);

Restrictions API Yandex.Speller



MIT License

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (70,402)ย 
nodejs (3,806)ย 
cli (1,805)ย 
yandex (40)ย 
spellcheck (31)ย