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

Add Prettier and format all Markdown docs #41

Merged
merged 6 commits into from
Nov 8, 2021

Conversation

amaltson
Copy link
Contributor

This is the first in a couple of PRs to address #36. This first PR does the
following:

  • Initialize a package.json to start making use of NPM to install and then use
    Prettier to format our Markdown documents.
  • Add Prettier and a couple NPM scripts to make formatting and linting easy.
  • Format all the Markdown docs using Prettier.
  • Add instructions for how to make use of the fmt command and some initial
    workstation setup instructions.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 30, 2021

CLA Signed

The committers are authorized under a signed CLA.

In order to have Prettier for formatting all the Markdown files, we need
to add a package.json for npm.

re #36
Add a dependency on the Prettier package so we can start using it for
formatting Markdown files.

Add the package-lock.json to ensure we maintain our dependency tree in
source control. Also, we now need to ensure we gitignore the
node_modules directory.

re #36
Using NPM's scripts feature, add a couple useful commands to format the
markdown files and ensure they stay formatted.

re #36
Now that we have prettier installed and easy to access npm scripts, we
can format all the Markdown files to the default Prettier formatting.

re #36
Add clear instructions to ensure all contributions format documents with
Prettier and add an initial section outlining how to setup one's
workstation for making a contribution.

re #36
Configure Prettier to always wrap long lines (prose) by adding a local
Prettier config file. We can further tweak Prettier if we need with this
file.

See: https://prettier.io/docs/en/options.html#prose-wrap
Copy link
Member

@mcleo-d mcleo-d left a comment

Choose a reason for hiding this comment

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

Hey @amaltson - I believe these changes have also been picked up in #42 and #44 too.

It would be awesome to plan the PR merge order to make sure you don't pick up any accidental merge conflicts should content be altered as the other PRs are reviewed and potentially changed.

I suggest this PR is merged first to get the initial MD change into the repo. It would be awesome to get your thoughts?

@amaltson
Copy link
Contributor Author

amaltson commented Nov 3, 2021

@mcleo-d that's exactly right. The PR merge order should be:

  1. This PR, Add Prettier and format all Markdown docs #41
  2. Then Add a new pipeline GitHub Action #42 should be rebased and merged (though I want to rename the pipeline a bit).
  3. Then Add DevContainer for easier workstation setup #44 should be rebased and merged

Technically #44 can come before #42 as well. But after each merge I'll make sure to rebase the PRs.

#43 is independent of all of them, so it can go any time.

Copy link
Contributor

@godds godds 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

@amaltson amaltson merged commit 1625332 into master Nov 8, 2021
@amaltson amaltson deleted the add-prettier-markdown-formatting branch November 8, 2021 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants