Skip to content

feat: documentation linting #1745

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

Merged
merged 12 commits into from
Aug 7, 2019
Merged

feat: documentation linting #1745

merged 12 commits into from
Aug 7, 2019

Conversation

sarahdayan
Copy link
Contributor

@sarahdayan sarahdayan commented Aug 6, 2019

Summary

This PR adds content linting to the documentation of VuePress, using textlint.

Some rules (the more subjective ones) are set with a warning severity, meaning they wouldn't make a CI fail. It also leaves the possibility of progressively fixing things.

The PR is quite large because it also embarks a first run at fixing issues that were revealed by textlint.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

Content linting was added as a pre-commit hook. I changed the way the other pre-commit hook was wired so the whole thing works properly across the monorepo.

Question: for now, the linting precommit hooks are split into two:

  • a local one in docs/ (the one created in this PR)
  • a global one at the root (to lint JavaScript and Vue files)

They're triggered by running the global precommit first, then the local ones with lerna run.
Ideally, it's better to have a command per repo. Do we think it's worth it?

@sarahdayan sarahdayan added topic: docs Used when working with docs and removed topic: docs Used when working with docs labels Aug 6, 2019
Copy link
Contributor

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! 🎉

(This is not 100% related, by we don't have a CONTRIBUTING.md guide in the repo, which I guess should be the next task after #1745)

@sobolevn sobolevn mentioned this pull request Aug 6, 2019
@sarahdayan sarahdayan marked this pull request as ready for review August 6, 2019 08:28
@sarahdayan sarahdayan requested a review from ulivz August 6, 2019 08:28
@sobolevn sobolevn added the topic: docs Used when working with docs label Aug 7, 2019
@sobolevn
Copy link
Contributor

sobolevn commented Aug 7, 2019

@sarahdayan how about Chinese and Russian languages? Are they supported?

Copy link
Member

@ulivz ulivz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!

@ulivz ulivz merged commit 8039f42 into master Aug 7, 2019
@sarahdayan sarahdayan deleted the feat/doc-linting branch August 7, 2019 15:28
@vue-bot
Copy link

vue-bot commented Aug 7, 2019

Hey @sarahdayan, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

@sarahdayan
Copy link
Contributor Author

@sarahdayan how about Chinese and Russian languages? Are they supported?

Unfortunately they're not. There are some rules for Japanese out there, but if we want to support Chinese and Russian we'll have to create new rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: docs Used when working with docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants