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
lint README and add gh workflow to do so #2784
Conversation
Thanks! This is actually nice.
|
a84b735
to
76574d3
Compare
My pleasure! Fixed, pardon the force push! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm extremely hesitant to accept these automated changes. There are some significant formatting changes I have called out, and very likely many that I haven't.
Then let's not land this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these automated changes are good enough for us.
In fact most thing @jsumners pointed it were manual errors on my end that the automation did not touch. I'll try again, this time only with automated changes and add any remaining broken rules to the ignored rules file. |
More rules have been ignored and a much lighter touch has been applied, PTAL. |
Can we re-start this PR in a new one that addresses files in smaller, easier to digest, chunks? For example, maybe start off with the main README and one or two other documents. That would make it easier to review the rules and agree upon them before they are applied across everything. As we agree on the initial set of documents, a few more can be added, and so on until we have covered them all. I realize it will take more time, but this PR is really too much to review. |
Sure! |
03843c8
to
73bec6c
Compare
PTAL @jsumners this PR has been restarted from scratch, only README is touched and most rules are turned off for the time being. Just blank lines and spaces. :) |
73bec6c
to
e91be7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so far
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a better approach, for sure. LGTM.
Would you mind to add a script in package.json to run the markdown linting? |
Good idea |
321ba6e
to
500669f
Compare
done! |
package.json
Outdated
@@ -20,7 +20,9 @@ | |||
"test:ci": "npm run lint && npm run unit -- --cov --coverage-report=lcovonly && npm run test:typescript", | |||
"bench": "branchcmp -r 2 -g -s \"npm run benchmark\"", | |||
"benchmark": "npx concurrently -k -s first \"node ./examples/simple.js\" \"npx autocannon -c 100 -d 5 -p 10 localhost:3000/\"", | |||
"license-checker": "license-checker --production --onlyAllow=\"MIT;ISC;BSD-3-Clause;BSD-2-Clause\"" | |||
"license-checker": "license-checker --production --onlyAllow=\"MIT;ISC;BSD-3-Clause;BSD-2-Clause\"", | |||
"markdownlint": "markdownlint '**/*.md'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tool is really annoying. I can't find any documentation about what options it accepts in the configuration dotfile to determine if the target file list can be specified there instead of repeated throughout our code base.
As an example of what I'm looking for, https://node-tap.org/docs/configuring/ clearly shows how to generate a default configuration file. It also shows that --files
can be added to a configuration like so:
files:
- index.test.js
- 'test/**/*.test.js'
Do you know if this same thing can be done with the Markdown lint tool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, I'm sorry you are annoyed, I can close this PR, the purpose was to improve document quality but the amount of grief it seems to cause you does not warrant it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against the PR. I'm just frustrated with the tool's lack of transparency. As best I can tell, markdownlint-cli
is the thing that reads the configuration and kicks off the linter. But that tool's readme doesn't provide a list, or a link to a list, of all possible configuration options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true.
I've filed:
igorshubovych/markdownlint-cli#158
igorshubovych/markdownlint-cli#159
maybe see what they say and can decide if the tool will be worth fastify maintainers' while.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've ported to markdownlint-cli2
PTAL and let me know your preference!
The files we want to lint still need to be specified every time it is invoked though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The openjs foundation uses this tool remark that seems more documented to lint MD files
If you want to be paranoid, it may be desirable to explicitly list the enabled rules in the configuration as well so that new rules aren't applied unexpectedly. Additionally, you may choose to set I have also commented on both issues opened against the CLI. Thanks! |
Signed-off-by: naseemkullah <naseem@transit.app> After discussing with project maintainers, majority of rules are ignored, though spacing is still improved. Only README is added for now. More markdown files can be added and rules turned on on a per-need basis.
Signed-off-by: naseemkullah <naseem@transit.app>
Signed-off-by: naseemkullah <naseem@transit.app>
Signed-off-by: naseemkullah <naseem@transit.app>
fe185fb
to
058c71f
Compare
48e341a
to
993a5ad
Compare
To see if fasitfy maintainers prefer this.
993a5ad
to
44cb56e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference with these new changes?
Not much in fact. The new underlying CLI has more config options, none of which we use today but they are easy to find in the README. Also thought I'd give it a try as the maintainer of both this CLI and it's underlying library (markdownlint) @DavidAnson has been very responsive to our feedback and may add a files config option in the future. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Signed-off-by: naseemkullah naseem@transit.app
Checklist
npm run test
andnpm run benchmark
and the Code of conduct