eslint-plugin-textlint
v0.2.2
Published
Enable textlint in eslint
Downloads
228
Maintainers
Readme
eslint-plugin-textlint
Introduction
Enable textlint in eslint.
If there are any advices or questions, submit issue.
Installation
You'll first need to install ESLint and TextLint:
npm i eslint textlint --save-dev
Next, install eslint-plugin-textlint
:
npm install eslint-plugin-textlint --save-dev
Usage
.eslintrc
configuration
- Add
textlint
to the plugins section of your.eslintrc
configuration file. You can omit theeslint-plugin-
prefix:
{
"plugins": [
"textlint"
]
}
- Configure the rules you want to use under the rules section in
.eslintrc
.
{
"rules": {
"textlint/textlint": [2, { "lintType": "all", "ignoreImportDeclaration": true }]
}
}
rule: textlint/textlint
This rule has an object option:
"lintType": "all" (default) | "comment" | "code"
"all"
: (default) inspect comments and codes."comment"
: inspect only comments."code"
: inspect only codes (strings and templates in codes).
"ignoreImportDeclaration": true (default) | false
true
: ignore literal in import(ES Module) and require(CMD) statement.false
: check literal in import(ES Module) and require(CMD) statement.
.textlintrc
configuration
- Add
"@textlint/text": true
to the plugins section of your.textlintrc
configuration file.
{
"plugins": {
"@textlint/text": true,
}
}
- Configure the rules you want to use under the rules section in
.textlintrc
.
{
"rules": {
// whatever you want
}
}
Rules
🔧 Automatically fixable by the --fix
CLI option.
| Name | Description | 🔧 | |:-----------------------------------|:--------------------------|:---| | textlint | Enable textlint in eslint | 🔧 |
License
eslint-plugin-textlint
is licensed under the MIT License.