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

Lint document and add linting step #14

Merged
merged 19 commits into from
Oct 27, 2023
Merged

Lint document and add linting step #14

merged 19 commits into from
Oct 27, 2023

Conversation

tyler36
Copy link
Contributor

@tyler36 tyler36 commented Sep 20, 2023

This PR does some minor cleanup:

  • standardize indenting
  • remove duplicate word

@tyler36 tyler36 requested a review from a team as a code owner September 20, 2023 01:22
Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Do you have an automated way of linting that you could do a PR for?

@tyler36
Copy link
Contributor Author

tyler36 commented Sep 20, 2023

I manually updated it. If I find a github action, I'll make another PR.

@rfay
Copy link
Member

rfay commented Sep 20, 2023

I really apologize about this being all conflicted now because the other one got in there before you. If you can find a way to automate it this time even if you have to do run it manually, that may be a step forward.

Note that Goland did not complain about the existing format.

@tyler36 tyler36 requested a review from a team as a code owner September 20, 2023 02:27
@tyler36
Copy link
Contributor Author

tyler36 commented Sep 20, 2023

I have added a "prettier" action. I set the action to lint JSON, as well as JS and MD files.

Prettier is considered opinionated so you may want to change the options. (https://prettier.io/docs/en/configuration.html)
Requesting re-review as not sure if the rules conflict with what @mattstein is doing/planning for docs.

@rfay rfay changed the title Lint document Lint document and add linting check Sep 20, 2023
@rfay rfay changed the title Lint document and add linting check Lint document and add linting step Sep 20, 2023
Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add instructions to the README about how to manually prettify. Thanks!

.github/workflows/linting.yaml Outdated Show resolved Hide resolved
@mattstein
Copy link
Contributor

I turn Prettier off in VS Code when I’m editing Markdown because it’s too opinionated and bossy. We’ve been here before with a quick auto-formatting change wrecking intentional line breaks and adding confusion, and I’m not keen on applying this everywhere to see what breaks. (With the write option enabled, there’d also be no way to fix it!)

That said, if everybody else is a fan go for it!

@rfay
Copy link
Member

rfay commented Sep 21, 2023

I don't think the commit is going to work at all for forked PRs, so perhaps just providing the way to reformat is the way?

@mattstein do you object to the actual results of prettier on this json file?

@mattstein
Copy link
Contributor

No objection at all @rfay!

@rfay
Copy link
Member

rfay commented Sep 21, 2023

@tyler36 I'm pretty sure the best path is to change the prettier formatting to a check instead of a commit, and then just require people to have it in that format, so the README can say how.

@tyler36
Copy link
Contributor Author

tyler36 commented Sep 22, 2023

Instructions added

@tyler36 tyler36 marked this pull request as draft September 22, 2023 03:33
@tyler36 tyler36 marked this pull request as ready for review October 5, 2023 03:43
@tyler36
Copy link
Contributor Author

tyler36 commented Oct 5, 2023

If we target jsonc files, we should probably target json as well.
An earlier commit updated JavaScript files, so I've added that to the workflow and manual run.

I turn Prettier off in VS Code when I’m editing Markdown

Currently, NOT targetting markdown.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand really why anything matters besides the remote-config.jsonc, and don't understand why this touches that file if it was already properly formatted.

README.md Outdated Show resolved Hide resolved
This reverts commit fe83e4d.
@rfay
Copy link
Member

rfay commented Oct 10, 2023

This does seem to have trouble @tyler36 - it doesn't pass its own tests A branch or tag with the name '2023092_linting' could not be found - is it unable to do forked PRs, or ... ???

@rfay
Copy link
Member

rfay commented Oct 12, 2023

Yay!

@tyler36
Copy link
Contributor Author

tyler36 commented Oct 19, 2023

Anything else?

@bmartinez287
Copy link
Contributor

bmartinez287 commented Oct 19, 2023

We may want to grab the latest version of remote-config.jsonc. Otherwise, some of the tips will be deleted.

@tyler36
Copy link
Contributor Author

tyler36 commented Oct 19, 2023

@bmartinez287

Thanks for the heads up. File was synced with current tips.

@tyler36 tyler36 requested a review from rfay October 19, 2023 03:18
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tyler36 and others added 3 commits October 20, 2023 09:06
Co-authored-by: Matt Stein <[email protected]>
Co-authored-by: Matt Stein <[email protected]>
Co-authored-by: Matt Stein <[email protected]>
@rfay rfay merged commit 5873500 into ddev:main Oct 27, 2023
2 checks passed
@rfay
Copy link
Member

rfay commented Oct 27, 2023

Thanks for all the hard work on this @tyler36 .

@tyler36 tyler36 deleted the 2023092_linting branch October 30, 2023 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants