Skip to content
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

Consider adding linting to md files #253

Open
rousik opened this issue Mar 27, 2020 · 1 comment
Open

Consider adding linting to md files #253

rousik opened this issue Mar 27, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@rousik
Copy link
Collaborator

rousik commented Mar 27, 2020

As per slack conversation w/ @nditada, translation are often inadvertently making preventable mistakes (e.g. spaces between [] () in links and such). It is possible that some of these problems (and probably whole different set of others) could be discovered by having linter enabled for our md files.

I have tried to use markdownlint-cli (availabe via NPM) and it reveals a lot of issues, here's summary of errors it found across all MD files sorted by frequency:

1 MD037/no-space-in-emphasis 2 MD018/no-missing-space-atx 2 MD039/no-space-in-links 3 MD005/list-indent 4 MD019/no-multiple-space-atx 5 MD001/heading-increment/header-increment 8 MD032/blanks-around-lists 10 MD036/no-emphasis-as-heading/no-emphasis-as-header 11 MD024/no-duplicate-heading/no-duplicate-header 15 MD025/single-title/single-h1 21 MD045/no-alt-text 23 MD047/single-trailing-newline 38 MD033/no-inline-html 57 MD012/no-multiple-blanks 62 MD030/list-marker-space 67 MD034/no-bare-urls 83 MD007/ul-indent 101 MD026/no-trailing-punctuation 251 MD009/no-trailing-spaces 291 MD041/first-line-heading/first-line-h1 520 MD022/blanks-around-headings/blanks-around-headers 1021 MD013/line-length

We can obviously choose to opt-out from some of the rules if we don't think they can be easily adopted or that are not worth following (e.g. line length). Linter may fix some of these things automatically.

@rousik rousik added the enhancement New feature or request label Mar 27, 2020
@mverzilli
Copy link
Contributor

I think it's a good idea provided we can set it as a post commit hook. We can't expect content contributors to set a linter up given in general we need to assume a life sciences background (AFAIK most people directly edits on GitHub).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants