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
feat: TechDocs - Add vale linter to check words quality in md files. #2631
Conversation
Initialize .vale.ini file Add 'lint:docs' script to package.json, to lint all md files except the ones which are located in node_modules Generate 'vocab.txt' by using command 'yarn run lint:docs' | grep -o ''[a-z A-Z]*'' | grep -o '[a-z A-Z]*' | sort | uniq > .github/styles/vocab.txt Add steps to github workflow 'master' to check docs quality
WOW!! This is awesome, will definitely look through it more asap 💯 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really neat. I looked at vale a little while back but haven't tried it. Good to see it in use.
An additional thought would be to have a lint-staged / git hook check as well. This would help avoid people not noticing issues until CI.
Updates:
Can you please check |
Hey! This is the error i'm getting trying to run on windows.
|
@hooloovooo Can you please check it again? |
|
If running check-docs-quality.js directly using node I get this error instead
|
@andrewthauer I have removed shebang as we are using this script only once. Is it ok? @hooloovooo This time I have checked in windows machine and is working. Can you please verify? |
@Marvin9 - I'm a bit indifferent, but my default is to use executables for scripts. I would say that if the file has an executable flag the the shebang should be there if not it's pointless. |
@Marvin9 Confirmed to work now! :) |
Documentation updates required to mention installation of vale cli. I will update that. |
@Marvin9 Looks good to me, there is just a markdown files quality check that needs to pass before merge! |
@spotify/silver-lining can we get a review from you since this PR makes some spelling changes to your documentation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@Marvin9 thank you so much for your contribution 🥳 |
Hey, I just made a Pull Request!
Closes #2031
Approach to solve #2031 using vale linter.
.vale.ini
. sourcevale foo.md bar.md
to run linter. So automatic way to achieve it is bygrep
&git
.md
files.vale
package.json
aslint:docs
.vocab.txt
file.vale.Spelling
error, so we have to add them insidevocab.txt
file.vocab.txt
using below command.vocab.txt
, discard which are invalid and correct them in file where they were located.Usage:
Limitation:
vocab.txt
is required for false positives.✔️ Checklist
yarn test