textlint icon indicating copy to clipboard operation
textlint copied to clipboard

textlint doesn't produce output for org-mode files (.org file extension)

Open robstewart57 opened this issue 6 years ago • 4 comments

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?

robstewart57 avatar Dec 23 '18 17:12 robstewart57

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"]
        }
    }
}

azu avatar Dec 23 '18 23:12 azu

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?

robstewart57 avatar Dec 24 '18 12:12 robstewart57

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.

robstewart57 avatar Dec 24 '18 12:12 robstewart57

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.

azu avatar Dec 25 '18 12:12 azu

Close - This will be 3rd-party plugin.

azu avatar Feb 02 '23 11:02 azu