debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Improve documentation linting

Open jasonLaster opened this issue 9 years ago • 16 comments

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

jasonLaster avatar Aug 11 '17 15:08 jasonLaster

I would like to give this a shot, if it is a good first step in getting to know the project

tohmjudson avatar Sep 18 '17 16:09 tohmjudson

@tohmjudson sure, which one would you like to work on?

jasonLaster avatar Sep 18 '17 16:09 jasonLaster

I think I can start with the first and go from there, if that works for you

tohmjudson avatar Sep 18 '17 16:09 tohmjudson

sounds good!

jasonLaster avatar Sep 18 '17 16:09 jasonLaster

Hi @tohmjudson , would you be completing all the linters? If its alright I'd like to give it a try too

steffiau avatar Sep 28 '17 22:09 steffiau

The first 4 are done and in the package, but if you would like to add the gender checking, go for it!

tohmjudson avatar Sep 28 '17 23:09 tohmjudson

Awesome, I'll work on it this weekend!

steffiau avatar Sep 28 '17 23:09 steffiau

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

steffiau avatar Sep 30 '17 23:09 steffiau

Sure! I was in the same place last week.

  1. 'retext-equality' should be installed into the devtools-linter project
  2. After that install completes, cd into the debugger.html folder, and run yarn link devtools-linters to make sure the devtools-linter is linked and then
  3. run yarn lint-md If all is good, this will run through all of the debugger files, look for errors, and print to the console

Hope that helps :)

tohmjudson avatar Oct 01 '17 03:10 tohmjudson

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.

steffiau avatar Oct 01 '17 18:10 steffiau

hmm, this seems to be an issue w/ yarn link or running in the linteres directory

jasonLaster avatar Oct 02 '17 03:10 jasonLaster

try making the change in debugger.html/node_modules/devtools-linters...

jasonLaster avatar Oct 02 '17 03:10 jasonLaster

if you get it working there, you can copy it over

jasonLaster avatar Oct 02 '17 03:10 jasonLaster

@steffiau OK, so I think I am on to what is going on... it seems to be the file routing:

  1. in devtools-linters/natural-language/preset.js change the following line from: path.join(__dirname, "../../../assets/", "dictionary.txt"),"utf8") to path.join(__dirname, "dictionary.txt"),"utf8")

  2. add require("retext-equality"), after require("retext-emoji"),

  3. yarn link in devtools-linters

  4. in debugger.html run yarn link devtools-linters

  5. and still in debugger.html, runyarn lint-md

  6. profit!!! hopefully, you will see the errors/typos like this: "77:125-77:130 warning actor may be insensitive, use performer, star, artist instead"

We can check the file routing if that works :)

tohmjudson avatar Oct 03 '17 02:10 tohmjudson

thanks @tohmjudson!

jasonLaster avatar Oct 03 '17 02:10 jasonLaster

That was it, I got it running! Thanks @tohmjudson @jasonLaster ! I'll get a pull request up asap. :)

steffiau avatar Oct 04 '17 01:10 steffiau