-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
ci: sync Markdownlint setup from mdn/content #8181
Conversation
d5538d4
to
b50296d
Compare
Note that some of the issues will be silenced with #7778, and normally the second Markdownlint that only runs on changed markdown files will be run. |
b50296d
to
dd751de
Compare
We shouldn't link the linter version to the We do not have to install all the content/yari dependancies to lint the translated content:
|
Very valid point from @OnkarRuikar, so how about having a workflow instead that opens a PR with these changes? |
They content is synced across, so I think I'm not sure why they wouldn't use the same tools. This repo hasn't been cleaned up and is still in the process of converting to Markdown, so having the task now would help flag stuff to cleanup as it lands. If you think it shouldn't leverage the lock/package from the other project, I think there should be a separate copy in this repo+dependabot rather than embedded versions in the action files |
It's not about the tools being same. It's about tool versions. The content project doesn't wait for this repo to update the tool versions.
I agree. We need to do |
I ran |
In order for contributors to avoid facing errors in local environment we need to provide engine version in package.json: "engines": {
"node": ">=14"
}, We can have the same or as we are starting a fresh we can start with the latest engine |
I think CI is mostly 16 right now, so 14/16 would probably be better for now if you want to add the engine |
Let's use the same version constraint as yari and content (after mdn/content#20240). |
I've add the engines to match the pending PR upstream, and added the MD051/52 disable to this PR (which knocks off 3K issues) |
@caugner I've got a bunch of PRs to cleanup a bunch of the issues, but this should be good to land |
23ea6dd
to
01445eb
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
This can either land as-is, or I'll updated it to match mdn/content#20330 if that lands |
I'm for updating to markdownlint-cli2. |
Flipping to draft to switch this over to CLI2, now that the upstream PR landed |
Ping @caugner it would be good to land so we can see if the autofix PRs work. It's OK to have the job failure right now |
@caugner do you want me to rebase/squash the commits? |
Yes could you @nschonni - I'll see if we can get final review and merge 👍 |
Also having a look 👀 |
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.
One comment open about using latest GH action, but can be addressed in a follow-up.
Edit: the gh action is now bumped to tj-actions/changed-files@v34
I don't see anything wrong (aside from failing CI 😄), so also leaving a LGTM 👍🏻
46d2140
to
8f6ef52
Compare
The failures for the job can be used to test the Autofix PR job |
There is an odd fix for the headings in blockquote that I'm going to raise upstream, but not blocking this |
Are we OK with Markdownlint failing? Looking at the log there are no "errors" but there are 20 warnings. |
Upstream, they changed it from Errors to Warning to the severity. I'm not sure I get the benefit, as the job will fail either way, but I guess it looks less scary on the reviewers. The 20 issues are fine, as this PR includes a new job that will create PRs to fix the existing issues. I created a manual one for the Japanese texts since there are formatting issues that the autofix won't quite handle. Landing this is fine though |
Yes. We don't want to burden online(on Github) contributors with lint errors, cos they may not know Markdown syntax, so the lint errors are marked as warning. Also because we have a bot in place that daily autofixes the lint issues. Note: Fixing lint issues has been made mandatory for those who push changes using git. |
This pull request has merge conflicts that must be resolved before it can be merged. |
8f6ef52
to
03a2edc
Compare
Thanks @caugner ! Now to wait and see how the auto-PRs go 😄 |
Sorry for ignoring the PAT field, should we use
|
Yeah, I guess that would be needed to have the PRs trigger subsequent CI jobs |
This comment was marked as outdated.
This comment was marked as outdated.
@hochan222 The error is not related to the changes done in that PR; it's related to the workflow code. Try re-running the workflow. Go to the latest failing check's log and click on Re-run jobs -> Re-run all jobs. If that fails rebase the PR's branch, which will automatically trigger all the workflows.. Linting is should not mandatory. I suggest simply merge the PR. If there are linting errors, they will be fixed by cron job next midnight UTC. |
@OnkarRuikar Thank you for your reply. The error I encountered in various PRs was that the markdownlint workflow failed after further changes, even though the first time passed fine. Even running the workflow again failed the same. In the end, I asked contributors to rebase or re-commit for this. (Even though there are actually no markdownlint errors(maybe..?).. just for workflow) Also, In the way to merge right away... the reason I wrote it for confirmation was because I was concerned about that it was displayed as an X rather than a check. I'm afraid it will set a bad precedent. Nevertheless, if it's okay, I think it's better to just merge. |
Copied the setup from the upstream repo, but added a step to copy over the package.json and yarn.lock to use the same version of the tools