-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
Update remark-lint config #423
Conversation
Signed-off-by: Thomas Dietrich <[email protected]>
2f9de13
to
365651b
Compare
Hi Thom, Just so I understand what this is, I am familiar with nslint for checking nameserver configurations, so I assume this is a *nix-based tool to perform a similar check against the openhab documentation. Do I understand correctly? FWIW, I am happy to chip in where I can in order to knock down the number of warnings, especially on areas of the documentation where I am actively contributing. |
Yes more or less. With the configuration available you can run style guide checks about the way the markdown files are structured. This will avoid malformed output. I'm using the excellent editor Atom with the linter-markdown plugin (and the markdown preview plugin). The result will for example look like this: https://atom.io/packages/linter-markdown Thanks for the offer! I'll contact you as soon as this PR was merged. We can divide the work. Maybe you want to combine this with a general rewrite of one of the articles. Transformations would be something... |
I'll go ahead and merge. We can still add improvements at a later point. |
Signed-off-by: Thomas Dietrich <[email protected]>
For whom it may concern: I've added a few lines of usage hints to the file. |
Hey @ThomDietrich, Since VsCode is trending parallel to this effort here, I have not worked with the linting feature yet, but understand the purpose behind it. |
First and foremost I'd say that one could use different editors for different tasks. Just because you can now comfortably build your openHAB config thanks to @kubawolanin, editing of docs doesn't need to happen there as well... That said: remark/remark-lint are command line tools and plugins for a few environments are available. See: https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-remark |
Always helps to have familiar tools for people who are new to the scene. Ive been using markdown mode for emacs but am keen to try out everything mentioned here!! |
Definitely! It would be amazing if the vscode extension does the job, I've not tested it yet. |
You're definitely right. Thanks for the marketplace link. |
@ThomDietrich, Thank you, thank you. As someone just getting into contributing to this project, you can't imagine how helpful just a few comments on usage added to a README can be. For example, I did not realize that this could be run from the command line as well as used inside of Atom. |
Seems to work for me within VSCode with |
@Confectrician looks amazing! Does the extension use the RemarkConfig provided via package.json? |
I have configured exactly nothing. I will do some further testing, but wanted to share the first impression. |
Okay sounds like the config is not used :) That could be an issue because different settings preferences will be applied. That's not a big problem at first but would be great to eliminate. |
No need to hurry. |
Remark Lint is a remark linter and should help checking our Markdown syntax from here on out. The settings configured here check almost everything important to us / .... me. 😄
To get a quick overview, the following rules are included in that overwrite order:
"remark-lint-maximum-line-length", 240
- I chose this number as a sain compromise. Why? It's not nothing but caps at exactly two lines here on GitHub"remark-lint-no-missing-blank-lines"
- Makes sure code blocks (and others) are surrounded by blank lines needed by jekyll"remark-lint-no-tabs"
- sure thing"remark-lint-unordered-list-marker-style", "-"
- The only one I might need to explain. Up to this point I've used asterisks for lists. Because of this I decided to go with "-" for our style guide. I would be interested in your opinion!The only rule currently not in here (because it's currently broken) is the one some of you might think is the one most dear to me.
With the remark-lint settings in place I'm seeing the following:
I'll start looking into these step by step. The hardest challenge will be to unify all the Addons readmes.
While going through the articles, I'll also make sure to build a short article to aid as a style guide description.
Before I start to invest any further effort I'd be interested in your feedback. Let me know if you are unsure about one of the settings described above.
Ping @thorsten Confectrician @bgilmer77
Signed-off-by: Thomas Dietrich [email protected]