Textlint
textlint is the pluggable linter for natural language text.
Install / Use
/learn @textlint/TextlintREADME
textlint
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://textlint.org/media/banner/banner_710x256.png"> <source media="(prefers-color-scheme: light)" srcset="https://textlint.org/media/logo/spaced/textlint-logo.png"> <img alt="textlint logo" src="https://textlint.org/media/logo/spaced/textlint-logo.png"> </picture>The pluggable linting tool for natural language.
textlint is similar to ESLint, but it's for use with natural language.
<!-- textlint-disable --> <!-- textlint-enable -->Website
- Online demo
- Searchable documents
- Release blog
Visit https://textlint.org/.
Features
- No bundled rules.
- To use a rule, install a textlint rule via npm.
npm install textlint-rule-xxx.- See collection of textlint rules
- Markdown and plain text are supported by default. Support is available for HTML and other file formats via plugins.
- Supports the use of custom formatters and formatter bundles formatter(reporter)
Quick Tour
For a quick tour of textlint, checkout our Getting Started guide :squirrel:
Installation
You can install the textlint command using npm:
$ npm install textlint --save-dev
Requirements:
- Node.js 20+
If you're not sure what version of Node you're running, you can run node -v in your console to find out.
:warning: Warning:
- If you have installed
textlintglobally you must install each reference rule globally as well. - If you have installed
textlintlocally you must install each rule locally as well.
We recommend installing textlint locally.
For Node.js beginners
If you've never used Node.js and npm, please see the following:
Usage

textlint has no default rules!!
You can run textlint with .textlintrc.json config file.
# Install textlint and rules into local directory
npm install --save-dev textlint textlint-rule-no-todo
npx textlint --init command creates .textlintrc.json file from installed rules.
npx textlint --init
.textlintrc.json will be created like this:
{
"rules": {
"no-todo": true
}
}
Lint files via textlint:
npx textlint ./README.md
textlint load .textlintrc.json from current directory and lint README.md.
CLI
Run npx textlint -h for information on how to use the CLI.
$ textlint [options] file.md [file|dir|glob*]
Options:
-h, --help Show help.
-c, --config path::String Use configuration from this file or sharable config.
--ignore-path path::String Specify path to a file containing patterns that describes files to ignore. - default: .textlintignore
--init Create the config file if not existed. - default: false
--fix Automatically fix problems
--dry-run Enable dry-run mode for --fix. Only show result, don't change the file.
--debug Outputs debugging information
--print-config Print the config object to stdout
-v, --version Outputs the version number.
Using stdin:
--stdin Lint text provided on <STDIN>. - default: false
--stdin-filename String Specify filename to process STDIN as
Output:
-o, --output-file path::String Enable report to be written to a file.
-f, --format String Use a specific output format.
Available formatter : checkstyle, compact, github, jslint-xml, json, junit, pretty-error, stylish, table, tap, unix
Available formatter for --fix: compats, diff, fixed-result, json, stylish - default: stylish
--no-color Disable color in piped output.
--quiet Report errors only. - default: false
Specifying rules and plugins:
--no-textlintrc Disable .textlintrc
--plugin [String] Set plugin package name
--rule [String] Set rule package name
--preset [String] Set preset package name and load rules from preset package.
--rulesdir [path::String] Use additional rules from this directory
Caching:
--cache Only check changed files - default: false
--cache-location path::String Path to the cache file or directory - default: .textlintcache
Experimental:
--experimental Enable experimental flag.Some feature use on experimental.
--rules-base-directory path::String Set module base directory. textlint load modules(rules/presets/plugins) from the base directory.
--mcp Start textlint as the Model Context Protocol (MCP) server.
When running textlint, you can target files to lint using the glob patterns. Make sure that you enclose any glob parameter you pass in quotes.
$ npx textlint "docs/**"
For more details, see CLI documentation.
- Documentation: CLI
Example:
- :information_source: See examples/cli
.textlintrc
.textlintrc is config file that is loaded as JSON, YAML or JS via azu/rc-config-loader.
Running textlint with the following arguments
$ npx textlint --rule no-todo --rule very-nice-rule README.md
is equivalent to running textlint README.md in a directory with a .textlintrc.json containing the following json
{
"rules": {
"no-todo": true,
"very-nice-rule": true
}
}
You can also configure options for specific rules in your .textlintrc.json file.
{
"rules": {
"no-todo": false, // disable
"very-nice-rule": {
"key": "value"
}
}
}
For example here we pass the options ("key": "value") to very-nice-rule.
Options can be specified in your .textlintrc.json file as follows:
{
// Allow to comment in JSON
"rules": {
"<rule-name>": true | false | object
}
}
<!-- textlint-enable -->
:information_source: for more details see
Plugin
A textlint plugin is a set of rules and rulesConfig or customize parser.
To enable plugin, put the "plugin-name" into .textlintrc.json.
// `.textlintrc.json`
{
"plugins": [
"plugin-name"
],
// overwrite-plugins rules config
// <plugin>/<rule>
"rules": {
"plugin-name/rule-name" : false
}
}
<!-- textlint-enable -->
:information_source: See docs/plugin.md
Supported file formats
textlint supports Markdown and plain text by default.
Install Processor Plugin and add new file format support.
For example, if you want to lint HTML, use textlint-plugin-html as a plugin.
npm install textlint-plugin-html --save-dev
Add "html" to .textlintrc.json
{
"plugins": [
"html"
]
}
Run textlint on .html files:
textlint index.html
- Example: examples/html-plugin
- Documentation: docs/plugin.md
Optional supported file types:
- HTML: textlint-plugin-html
- reStructuredText: textlint-plugin-rst
- AsciiDoc/Asciidoctor: textlint-plugin-asciidoc-loose
- Re:VIEW: textlint-plugin-review
- Org-mode: textlint-plugin-org
See Processor Plugin List for details.
Rules list :green_heart:
textlint has no built-in rules, but there are 100+ pluggable rules:
See A Collection of textlint rule · textlint/textlint Wiki for more details.
If you create a new rule, please add it to the wiki :)
Fixable
Some rules are fixable using the --fix command lin
Related Skills
node-connect
333.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
333.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.0kCommit, push, and open a PR
