Improve documentation linting
Documentation is one the hardest things to review because there are so many ways you can make a mistake in english. We've started linting our documentation and would really appreciate help to continue adding rules
- [x] Enable spell checking jasonLaster/devtools-linters#5
- [x] Enable checking for repeated words jasonLaster/devtools-linters#8
- [x] Enable quote checking jasonLaster/devtools-linters#7
- [x] Enable sentence spacing checks jasonLaster/devtools-linters#6
- [ ] Add gender checking jasonLaster/devtools-linters#9
I would like to give this a shot, if it is a good first step in getting to know the project
@tohmjudson sure, which one would you like to work on?
I think I can start with the first and go from there, if that works for you
sounds good!
Hi @tohmjudson , would you be completing all the linters? If its alright I'd like to give it a try too
The first 4 are done and in the package, but if you would like to add the gender checking, go for it!
Awesome, I'll work on it this weekend!
Hi, wonder if I can get some help or pointers? I've yarn linked debugger and devtools-linter together. Should I install 'retext-equality' in debugger.html or devtools-linter? I haven't used yarn link before so I'm not sure what the next steps are
Sure! I was in the same place last week.
- 'retext-equality' should be installed into the devtools-linter project
- After that install completes, cd into the debugger.html folder, and run
yarn link devtools-lintersto make sure the devtools-linter is linked and then - run
yarn lint-mdIf all is good, this will run through all of the debugger files, look for errors, and print to the console
Hope that helps :)
Thanks @tohmjudson ! Unfortunately I'm still stuck on an error, I've done the above and ran yarn lint-md:
1:1 error Error: Cannot parse file `.remarkrc`
Cannot parse script `../devtools-linters/markdown/preset.js`
Error: ENOENT: no such file or directory, open '/Users/Owner/assets/dictionary.txt'
Not sure if this is the problem but when I try running remark on the terminal, it says
-bash: remark: command not found
Do I need to add remark to my path? Tried looking on github and stackoverflow but it hasn't been much help.
hmm, this seems to be an issue w/ yarn link or running in the linteres directory
try making the change in debugger.html/node_modules/devtools-linters...
if you get it working there, you can copy it over
@steffiau OK, so I think I am on to what is going on... it seems to be the file routing:
-
in devtools-linters/natural-language/preset.js change the following line from:
path.join(__dirname, "../../../assets/", "dictionary.txt"),"utf8")topath.join(__dirname, "dictionary.txt"),"utf8") -
add
require("retext-equality"),afterrequire("retext-emoji"), -
yarn linkin devtools-linters -
in debugger.html run
yarn link devtools-linters -
and still in debugger.html, run
yarn lint-md -
profit!!! hopefully, you will see the errors/typos like this: "77:125-77:130 warning
actormay be insensitive, useperformer,star,artistinstead"
We can check the file routing if that works :)
thanks @tohmjudson!
That was it, I got it running! Thanks @tohmjudson @jasonLaster ! I'll get a pull request up asap. :)