0.2.2 β’ Published 2 years ago
eslint-plugin-textlint v0.2.2
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-devNext, install eslint-plugin-textlint:
npm install eslint-plugin-textlint --save-devUsage
.eslintrc configuration
- Add
textlintto the plugins section of your.eslintrcconfiguration 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) | falsetrue: 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": trueto the plugins section of your.textlintrcconfiguration 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.