Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textlint spellchecker fails with pretty much every word of markdown file on Travis CI #628

Closed
kushalpandya opened this issue Oct 11, 2019 · 4 comments
Labels
Type: 3rd party rule This is an issue related to a 3rd party rule or plugin

Comments

@kushalpandya
Copy link

What version of textlint are you using?

v11.3.1

What file type (Markdown, plain text, etc.) are you using?

Markdown with Jekyll frontmatter

What did you do? Please include the actual source code causing the issue.

I have configured .textlintrc.json in my project's root directory with all the necessary configuration and it works fine locally when I run yarn lint:text (which internally executes textlint '_posts/*.md') and no errors are reported (when files are as per the rules I've defined).

However, on Travis CI where I have textlint build running on one of the stages, spellchecker itself fails complaining about several words present in the file. I also tried updating my package.json script target to explicitly specific -c .textlintrc.json in the textlint command but that doesn't help either.

What did you expect to happen?

textlint should pass on CI job similar to how it does locally provided that all other linting jobs are passing on CI.

@azu azu added the Type: 3rd party rule This is an issue related to a 3rd party rule or plugin label Oct 11, 2019
@azu
Copy link
Member

azu commented Oct 11, 2019

Is this issue related with https://github.com/textlint-rule/textlint-rule-spellchecker ?
Probably, it is a rule issue, not textlint issue.

FYI: https://github.com/textlint-rule/textlint-rule-spellchecker use OS's native spellchecker. Maybe, the result is diffrent by OS.

@kushalpandya
Copy link
Author

Ah interesting, I tested linter on macOS Mojave and Ubuntu 19.10, although Travis is using 18.04. For now I have commented out textlint job from my .travis.yml but I wonder if this can be configured to manually specify a third-party spell-checker that can be also be included in devDependencies. 🤔

@kushalpandya
Copy link
Author

Given that this is tricky problem and will require considerable work on spellchecker part, would there be a way to disable just spellchecker based on some env variable (that I can enable from Travis)?

@azu
Copy link
Member

azu commented Oct 19, 2019

textlint support JavaScript config file.

.textlintrc.js:

const ENABLE_SPELLCHECKER = !!process.env.ENABLE_SPELLCHECKER;
module.exports = {
  rules: {
    "spellchecker": ENABLE_SPELLCHECK
  }
}
$ ENABLE_SPELLCHECKER=true textlint README.md

@azu azu closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: 3rd party rule This is an issue related to a 3rd party rule or plugin
Projects
None yet
Development

No branches or pull requests

2 participants