-
Notifications
You must be signed in to change notification settings - Fork 182
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
Rewrite YAML + Markdown linting, use Prettier #1457
Comments
Correction, they're still broken: Run mshick/add-pr-comment@v1
Error: Resource not accessible by integration I must have been looking at a PR from a branch (eg. the sync) when I thought it was working. Ok, but still stands - just need to make it the other way around: mimic the nf-core linting comment but for the other lint tests. |
|
Can't we then run prettier as a first test and then followed by YAML and Markdown lint? |
https://prettier.io/docs/en/options.html#print-width From our conversation about google docs in slack the other day. |
Sorry @mashehu only just seeing this now but yeah, I came to the same conclusion. But I think that those rules are not super important are were mostly to make the linter less strict. Prettier is less strict by default (whilst still being strict enough in my mind). So I think we're good, hopefully.. |
YAML linting has been broken for ages, and since we fixed it recently it has now started throwing tonnes of errors everywhere and generally being annoying.
This extends to the latest pipeline sync, where PRs such as nf-core/pgdb#47 are failing CI with errors like this:
We can of course fix these errors in the template. But to be honest it feels like now is a good time to revisit this linting.
Proposal is to drop Markdown and YAML linting and instead use https://prettier.io - this does both and generally feels like a bit more of a polished tool. One major advantage is that Prettier can and does fix the linting errors for you, rather than just spitting out errors. There's also good editor plugin integrations available.
Whilst we're there, it would be good to revisit the automated PR comments. We have a weird setup for the nf-core lint results which were the result of a load of pain to do with GitHub Actions bot permissions, but the comments from the YAML and Markdown linting seem to be working now. So maybe we can simplify this a lot.
The text was updated successfully, but these errors were encountered: