Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

chore: use prettier on markdown files #177

Closed
wants to merge 2 commits into from

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Jan 19, 2022

This should ensure that we no longer get surprise changes when we edit tracked .md files in vscode as it applies all prettier rules, while still passing our markdown linting.

Please note that markdown files touched by this change are result of running pre-commit, no other manual changes were made.

Based on ansible/vscode-ansible#386

.github/CODE_OF_CONDUCT.md Outdated Show resolved Hide resolved
.github/CONTRIBUTING.md Outdated Show resolved Hide resolved
.github/SECURITY.md Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.prettierrc.yaml Outdated Show resolved Hide resolved
docs/changelog-fragments.d/README.md Outdated Show resolved Hide resolved
@@ -57,23 +50,20 @@ Added a `{user}` role to Sphinx config -- by {user}`webknjaz`
File `docs/changelog-fragments.d/116.feature.md`:

```md
Added support for nested module options (suboptions)
-- by {user}`tomaciazek`
Copy link
Member

Choose a reason for hiding this comment

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

This change doesn't make sense, it was demonstrating that it is okay to have more than one line in fragments.

Copy link
Member Author

Choose a reason for hiding this comment

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

That is clearly an unbacked statement as there is no need need to wrap text to show people they can wrap it or not. We are not in the business to teach people markdown syntax.

If you really wanted to demonstrate it you would have included something like `This can also wrap on multiple lines." as part of the fragment itself.

As we would introduce automatic formatting there we have no need to tell user how and where to wrap the text as that will be done automatically.

docs/changelog-fragments.d/README.md Outdated Show resolved Hide resolved

## Adding change notes with your PRs

It is very important to maintain a log for news of how
Copy link
Member

Choose a reason for hiding this comment

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

This huge rewrite contributes to the complexity of synchronizing this text across projects 👎

Copy link
Member Author

Choose a reason for hiding this comment

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

@ansible/devtools team never agreed on something like this. We do not have a reference sync source and the reality is that even if we would do, we could implement the same formatting on the other one.

Basically, i see the comment as diverging from the scope of the PR and no real reasons for excluding this file, especially as it will render any attempt to touch it with vscode a nightmare as prettier will reformat it.

docs/contributing/guidelines.md Outdated Show resolved Hide resolved
ssbarnea added a commit to ssbarnea/ansible-language-server that referenced this pull request Jan 20, 2022
Ensures that all our references keys are using lowercase in order
to workaround known prettier bug.

Related: prettier/prettier#3835
Required-By: ansible#177
ssbarnea added a commit to ssbarnea/ansible-language-server that referenced this pull request Jan 20, 2022
Ensures that all our references keys are using lowercase in order
to workaround known prettier bug.

Related: prettier/prettier#3835
Required-By: ansible#177
@ssbarnea ssbarnea marked this pull request as ready for review January 21, 2022 09:15
@ssbarnea ssbarnea requested a review from a team as a code owner January 21, 2022 09:15
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

I'm still against lowecasing. Please respect the previous agreement of not marking conversations as resolved because the requests there are not resolved.

@ssbarnea
Copy link
Member Author

I'm still against lowecasing. Please respect the previous agreement of not marking conversations as resolved because the requests there are not resolved.

That floating comment makes no sense because there is no lowercase change as part of this PR. The lowercasing was removed from this PR and that is why the original comment was marked as resolved, as it was not longer applying to that change.

@webknjaz
Copy link
Member

That floating comment makes no sense because there is no lowercase change as part of this PR.

It was here when I asked not to do it, and it was still implemented by sneakily merging it despite the request. If there is no value in giving reviews and people merge things via by separating patches and hiding them from reviewers who explicitly asked not to do them in the first place, is that our new accepted way of collaboration? Do you expect me to use this new best practice as well as a primary workaround?

@webknjaz
Copy link
Member

that is why the original comment was marked as resolved

It was not resolved, you did exactly opposite to what was asked. Is this what resolved actually means now?

@ssbarnea ssbarnea closed this Feb 5, 2022
@ssbarnea ssbarnea deleted the fix/prettier branch February 5, 2022 12:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants