Socket
Book a DemoInstallSign in
Socket

textlint-rule-spelling

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textlint-rule-spelling

A textlint rule for spelling of languages as much as possible

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

textlint-rule-spelling Build Status

A textlint rule for spelling of languages as much as possible

Install

Install with npm:

npm install textlint-rule-spelling dictionary-en # or dictionary-fr, ...

The dictionaries are available at wooorm/dictionaries

Usage

Via .textlintrc(Recommended)

{
    "rules": {
        "spelling": {
            "language": "en",
            "skipPatterns": ["JavaScript"],
            "wordDefinitionRegexp": "/[\\w']+/g",
            "suggestCorrections": true,
        }
    }
}

config

config.language

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.

config.skipPatterns

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.

config.wordDefinitionRegexp

Optional. You should override this if you notice an issue for your language. The default works for en.

     /[\w']+/g
config.suggestCorrections

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.

Via CLI

textlint --rule spelling README.md

Build

Builds source codes for publish to the lib folder. You can write ES2015+ source codes in src/ folder.

npm run build

Tests

Run test code in test folder. Test textlint rule by textlint-tester.

npm test

License

GPL-3.0-or-later © TANIGUCHI Masaya

Keywords

textlintrule

FAQs

Package last updated on 26 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts