Conversation
jsignell
left a comment
There was a problem hiding this comment.
Looks good to me and I agree about line length - my feeling is it just confuses the git history.
|
Depends. I usually try to break at remark can also run via CLI btw, doesn't necessarily need a package.json ( I think "useful link text" is actually important for accessibility. |
🤦🏼 I didn't find https://www.npmjs.com/package/remark-cli in my searching, my bad. I'm happy to switch back, since I don't believe markdownlint-cli2 supports link checking (it's a pretty light tool).
👍🏼 good point, I'll re-enable that rule and fix the links. |
|
I'm also not 100% sure how remark-cli enables the additional external packages, probably need to be installed upfront via npm... |
I can't find a pre-commit hook for remark-cli (this issue indicates there isn't one: remarkjs/remark-lint#227), so I'm inclined to stick with markdownlint-cli2. I've flailed for about twenty minutes to build a custom hook and I'm finding remark kind of fiddly. |
|
Fine for me. Can we find another tool that can check the links? I find that rather important to ensure links are no getting broken over time. |
|
Thanks, Pete. I can't approve as it's not fully working for me. Also, it's a bit confusing that the contributing has separate steps for the markdown cli, but then to run all tests (including markdown cli again), you have to run prek. Another issue is that the old link check did detect invalid fragments (if I recall correctly), but this one does not. That the most valuable check though. |
Agreed. I removed the section about markdownlint-cli2 and just point folks towards prek.
This one does, e.g. I manually modified a link and got: |
|
It seems it only checks it in the same file, but not other files... |
This comment has been minimized.
This comment has been minimized.
Bummer. I can take another crack at going back to remark |
|
Ok, switched to remark, and copied most of the config from the stac-extensions template. |
|
I still can't get prek running, unfortunately. |
|
Ok, no worries. Without prek, I'm inclined to abandon pre-commit hooks altogether and just provide manual instructions. I'll update. |
|
@m-mohr I removed prek and updated the linting instructions to be manual. Can't say I love all the packages that remark-lint needs (feels fiddly) but 🤷🏼 |
|
Thanks, Pete! It's modular, so I guess that is a valid path to go. I'm fine with merging this, but I think I'd recommend also adding a package.json so that it's easier to install. We could also add back stac-node-validator for validating the examples. I can take care of that later. => #49 |
Adds markdown linting via https://github.com/DavidAnson/markdownlint-cli2. STAC extension repos use https://github.com/remarkjs/remark, but I found the Github action and CLI tooling there to be a bit more awkward — I'd prefer to not add a
package.jsonif we don't have to.I also added https://github.com/j178/prek for running in CI and auto-running locally ... it's my new favorite alternative to pre-commit
I ignored two rules that seemed annoying and not super helpful, line-length and "useful link text". If folks think we should enforce those, I'm happy to turn them on instead.
Closes #12