forgejo/docs
31
58
Fork
You've already forked docs
249

add linting for docs markdown content #13

Merged
caesar merged 1 commit from pr/lint into next 2023年08月17日 01:00:07 +02:00
Member
Copy link

closes #10

closes #10
@ -13,0 +15,4 @@
corepack enable
pnpm install --frozen-lockfile
pnpm run lint:remark
pnpm run lint:prettier
Author
Member
Copy link

@earl-warren is this the best approach, or would it be better to create a separate action for linting? I guess a separate action would give better at-a-glance insight into what fails from the PR page.

@earl-warren is this the best approach, or would it be better to create a separate action for linting? I guess a separate action would give better at-a-glance insight into what fails from the PR page.

Each run step shows with its name and FWIW I find the separation good enough. What is disturbing is that sometimes the output of a step is found in another. Other than this it is ok.

Each run step shows with its name and FWIW I find the separation good enough. What is disturbing is that sometimes the output of a step is found in another. Other than this it is ok.
Contributor
Copy link

I initially tried that and then realized it is more difficult to work with. But that's a matter of personal preference, I think. At least with a sequence of run that very much look like a shell script it is easier to figure out what's going on without any Forgejo Action expertise.

I initially tried that and then realized it is more difficult to work with. But that's a matter of personal preference, I think. At least with a sequence of run that very much look like a shell script it is easier to figure out what's going on without any Forgejo Action expertise.
caesar changed title from (削除) WIP: add linting for docs markdown content (削除ここまで) to add linting for docs markdown content 2023年08月16日 21:47:22 +02:00
Ghost approved these changes 2023年08月16日 22:19:34 +02:00
@ -553,3 +553,3 @@
- upper - use one or more upper latin characters
- digit - use one or more digits
- spec - use one or more special characters as ``!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~``
- spec - use one or more special characters as ``!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~``
Owner
Copy link

What?

What?
Author
Member
Copy link

Prettier wants to remove the whitespace inside the code tags. It wanted to on the website repo too, it's not to do with the new config. It was just never run on the whole repo before, only on new commits. I thought this seemed like a good time to run it on the whole repo.

Prettier wants to remove the whitespace inside the code tags. It wanted to on the website repo too, it's not to do with the new config. It was just never run on the whole repo before, only on new commits. I thought this seemed like a good time to run it on the whole repo.
Owner
Copy link

Sure. It's just a bit awkward since this is the only change that's not introducing the linter itself. We could make a separate commit with this and merge it first. It should be fine as is, though.

Sure. It's just a bit awkward since this is the only change that's not introducing the linter itself. We could make a separate commit with this and merge it first. It should be fine as is, though.
Author
Member
Copy link

I felt that whilst adding the linter was a good time to lint everything, but if you think it should be a separate commit I'm happy either way.

I felt that whilst adding the linter was a good time to lint everything, but if you think it should be a separate commit I'm happy either way.
Author
Member
Copy link

For what it's worth there are a bunch of other lint changes it might be good to make at some point. In particular, I disabled remark-lint-no-undefined-references because the code is full of unescaped square brackets that aren't meant to be links. Ideally I think it should be re-enabled and they should all be escaped, but that should definitely be a commit of its own because it's a ton of changes.

For what it's worth there are a bunch of other lint changes it might be good to make at some point. In particular, I disabled `remark-lint-no-undefined-references` because the code is full of unescaped square brackets that aren't meant to be links. Ideally I think it should be re-enabled and they should all be escaped, but that should definitely be a commit of its own because it's a ton of changes.

I'm kind of questioning if it's worth making such a big mess in the docs repo for all the pnpm configuration. An alternative approach would be to have a script that clones the website repo and uses it's pnpm configuration. I think we'll need to have something like that for local previews anyway.

I'm kind of questioning if it's worth making such a big mess in the docs repo for all the pnpm configuration. An alternative approach would be to have a script that clones the website repo and uses it's pnpm configuration. I think we'll need to have something like that for local previews anyway.
crystal left a comment
Copy link

Actually, this is fine. You shouldn't need to download the website repo if you don't want the local preview.

Actually, this is fine. You shouldn't need to download the website repo if you don't want the local preview.

@caesar I think it would be best to squash this, but I'll let you decide how to go about merging it.

@caesar I think it would be best to squash this, but I'll let you decide how to go about merging it.
Author
Member
Copy link

I'll squash it, yes.

I'll squash it, yes.
caesar force-pushed pr/lint from f3168b65cc
All checks were successful
pr / preview (pull_request) Successful in 34s
to 4e059dc7f9
All checks were successful
pr / preview (pull_request) Successful in 35s
push / publish (push) Successful in 6s
2023年08月17日 00:58:27 +02:00
Compare
caesar deleted branch pr/lint 2023年08月17日 01:00:08 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
404
Broken links or missing content
backport/v1.19
Changes which should be backported to the v1.19 docs

Archived

backport/v1.20
Changes which should be backported to the v1.20 docs

Archived

backport/v1.21
Changes which should be backported to the v1.21 docs

Archived

backport/v10.0
Automated backport to v10.0

Archived

backport/v11.0
Automated backport to v11.0
backport/v12.0
Automated backport to v12.0

Archived

backport/v13.0
Automated backport to v13.0

Archived

backport/v14.0
Automated backport to v14.0

Archived

backport/v15.0
Automated backport to v15.0
backport/v16.0
Automated backport to v16.0
backport/v7.0
Automated backport to the v7.0 docs

Archived

backport/v8.0
Automated backport to the v8.0 docs

Archived

backport/v9.0
Automated backport to the v9.0 docs

Archived

good first issue
This issue is suitable for "drive-by contributors" wanting to contribute for the first time, and fixing it should be straightforward.
meta
Tooling and processes for maintaining the docs
new docs
Content to be added to the documentation

Archived

User research - Accessibility
Requires input about accessibility features, likely involves user testing.
User research - Blocked
Do not pick as-is! We are happy if you can help, but please coordinate with ongoing redesign in this area.
User research - Community
Community features, such as discovering other people's work or otherwise feeling welcome on a Forgejo instance.
User research - Config (instance)
Instance-wide configuration, authentication and other admin-only needs.
User research - Errors
How to deal with errors in the application and write helpful error messages.
User research - Filters
How filter and search is being worked with.
User research - Future backlog
The issue might be inspiring for future design work.
User research - Git workflow
AGit, fork-based and new Git workflow, PR creation etc
User research - Labels
Active research about Labels
User research - Moderation
Moderation Featuers for Admins are undergoing active User Research
User research - Needs input
Use this label to let the User Research team know their input is requested.
User research - Notifications/Dashboard
Research on how users should know what to do next.
User research - Rendering
Text rendering, markup languages etc
User research - Repo creation
Active research about the New Repo dialog.
User research - Repo units
The repo sections, disabling them and the "Add more" button.
User research - Security
User research - Settings (in-app)
How to structure in-app settings in the future?
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/docs!13
Reference in a new issue
forgejo/docs
No description provided.
Delete branch "pr/lint"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?