textlint
textlint copied to clipboard
textlint doesn't produce output for org-mode files (.org file extension)
What version of textlint are you using?
v11.0.1
What file type (Markdown, plain text, etc.) are you using?
org-mode markup.
What did you do? Please include the actual source code causing the issue.
Run textlint
on file.org
.
What did you expect to happen?
A non-empty report.
What actually happened? Please include the actual, raw output from textlint.
The file.org
content is:
Mistakes were made.
Running npx textlint --rule write-good file.org
returns no output.
Given the same file contents for a file.txt
file, i.e. with a filename ending in .txt
, textlint
returns:
1:10 error "were made" may be passive voice write-good
Why does textlint
return different outputs for these two files?
I don't know textlint plugin for org-mode file, but @textlint/textlint-plugin-text support extensions
option.
You can lint .org
file as txt
file by setting next configuration.
.textlintrc
:
{
"plugins": {
"@textlint/text": {
"extensions": [".org"]
}
}
}
Thanks, that's helpful.
Is there a way to define "extensions": [".org"]
as a textlint
command flag if --plugin @textlint/text
is given, rather than in a .textlintrc
file?
Although in this case, it might be better to develop textlint-plugin-orgmode
based on: https://github.com/mooz/org-js/, then add --plugin org
.
Is there a way to define "extensions": [".org"] as a textlint command flag if --plugin @textlint/text is given, rather than in a .textlintrc file?
No. Currently that command line flag does not exists.
Close - This will be 3rd-party plugin.