eslint-plugin-ru-typography
v1.2.0
Published
ESLint typography checker for russian language
Downloads
8
Maintainers
Readme
eslint-plugin-ru-typography
ESLint typography linter for russian language
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-ru-typography
:
$ npm install eslint-plugin-ru-typography --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-ru-typography
globally.
Usage
Add ru-typography
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"ru-typography"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"ru-typography/no-hanging-prepositions": "error"
}
}
Supported Rules
- autofix
ru-typography/no-hanging-hyphens
: check for hanging hyphens. For example, "елки_nbsp_- палки". Configuration:
{
"rules": {
"ru-typography/no-hanging-hyphens": ["error", {
// check only this hyphens
// default: ["-", "–"]
hyphens: ["-"]
}]
}
}
- autofix
ru-typography/no-hanging-prepositions
: check for hanging prepositions. For example, "елки и_nbsp_палки". Configuration:
{
"rules": {
"ru-typography/no-hanging-prepositions": ["error", {
// check only this prepositions
// default: ["в", "во", "без", "до", "из", "к", "ко", "на", "по", "о", "от", "при", "с", "у", "не", "за", "над", "для", "об", "под", "про", "и", "а", "но", "да", "или", "ли", "бы", "то", "что", "как", "я", "он", "мы", "они", "ни", "же", "вы", "им"]
prepositions: ["в", "и", "по"]
}]
}
}