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

Vanilla Prettier Setup in Blueprints #1055

Merged

Conversation

bertdeblock
Copy link
Member

@bertdeblock bertdeblock commented Dec 3, 2024

Propose "Vanilla Prettier Setup in Blueprints"

Rendered

Summary

This pull request is proposing a new RFC.

To succeed, it will need to pass into the Exploring Stage, followed by the Accepted Stage.

A Proposed or Exploring RFC may also move to the Closed Stage if it is withdrawn by the author or if it is rejected by the Ember team. This requires an "FCP to Close" period.

An FCP is required before merging this PR to advance to Accepted.

Upon merging this PR, automation will open a draft PR for this RFC to move to the Ready for Released Stage.

Exploring Stage Description

This stage is entered when the Ember team believes the concept described in the RFC should be pursued, but the RFC may still need some more work, discussion, answers to open questions, and/or a champion before it can move to the next stage.

An RFC is moved into Exploring with consensus of the relevant teams. The relevant team expects to spend time helping to refine the proposal. The RFC remains a PR and will have an Exploring label applied.

An Exploring RFC that is successfully completed can move to Accepted with an FCP is required as in the existing process. It may also be moved to Closed with an FCP.

Accepted Stage Description

To move into the "accepted stage" the RFC must have complete prose and have successfully passed through an "FCP to Accept" period in which the community has weighed in and consensus has been achieved on the direction. The relevant teams believe that the proposal is well-specified and ready for implementation. The RFC has a champion within one of the relevant teams.

If there are unanswered questions, we have outlined them and expect that they will be answered before Ready for Release.

When the RFC is accepted, the PR will be merged, and automation will open a new PR to move the RFC to the Ready for Release stage. That PR should be used to track implementation progress and gain consensus to move to the next stage.

Checklist to move to Exploring

  • The team believes the concepts described in the RFC should be pursued.
  • The label S-Proposed is removed from the PR and the label S-Exploring is added.
  • The Ember team is willing to work on the proposal to get it to Accepted

Checklist to move to Accepted

  • This PR has had the Final Comment Period label has been added to start the FCP
  • The RFC is announced in #news-and-announcements in the Ember Discord.
  • The RFC has complete prose, is well-specified and ready for implementation.
    • All sections of the RFC are filled out.
    • Any unanswered questions are outlined and expected to be answered before Ready for Release.
    • "How we teach this?" is sufficiently filled out.
  • The RFC has a champion within one of the relevant teams.
  • The RFC has consensus after the FCP period.

@bertdeblock bertdeblock added the T-ember-cli RFCs that impact the ember-cli library label Dec 3, 2024
@bertdeblock bertdeblock self-assigned this Dec 3, 2024
@github-actions github-actions bot added the S-Proposed In the Proposed Stage label Dec 3, 2024
@bertdeblock bertdeblock force-pushed the vanilla-prettier-setup-in-blueprints branch 4 times, most recently from a0528a0 to a6f3c98 Compare December 3, 2024 16:26
@ef4
Copy link
Contributor

ef4 commented Dec 3, 2024

I'm strongly in favor.

@NullVoxPopuli
Copy link
Contributor

big fan big fan

@gitKrystan
Copy link
Contributor

I'm strongly in favor of moving away from eslint-plugin-prettier and stylelint-prettier.

In addition to the reasons mentioned in this RFC, there's also the maintenance burden of supporting this setup for prettier-plugin-ember-template-tag. We went through a lot of churn and bugs on prettier-plugin-ember-template-tag and eslint-plugin-ember trying to get prettier-plugin-ember-template-tag to work with eslint-plugin-prettier/eslint. We'd probably still continue to support this setup, but if it's no longer recommended, we'd have an out if ESLint decides to break-all-the-things again and we don't want to maintain it.

@bertdeblock
Copy link
Member Author

I respect the feedback about the Prettier config changes, and will remove it from this RFC. I probably won't open a new RFC for it though, because if it doesn't fit in this RFC, I feel it won't make much sense as a separate one either. Also note, even without the proposed changes to the Prettier config file, the diff for existing apps can become quite big.

@mansona
Copy link
Member

mansona commented Dec 6, 2024

Also note, even without the proposed changes to the Prettier config file, the diff for existing apps can become quite big.

If we're not intending to change the prettier config and only the mechanism that prettier is run then how can this cause a big diff? 🤔

@bertdeblock
Copy link
Member Author

Because of the first point under motivation:

1. Because we run Prettier via ESLint and Stylelint, we only run the files these linters support through Prettier - Using a vanilla Prettier setup, would format all files Prettier supports, ensuring even more consistency in projects

.hbs, .html, .yaml, .yml, and so on, would now get picked up as well.

Formatting .hbs files might cause a big diff for projects I think.
Less if they were already using https://github.com/ember-template-lint/ember-template-lint-plugin-prettier for example.

@mansona
Copy link
Member

mansona commented Dec 6, 2024

yea I think it's reasonable to have a big diff for files that are newly being "prettier-ed", It's just a bigger lift for people I think if they have to switch from one "pretty" version to a different one 🙈

@ef4 ef4 added S-Exploring In the Exploring RFC Stage and removed S-Proposed In the Proposed Stage labels Dec 6, 2024
@bertdeblock bertdeblock force-pushed the vanilla-prettier-setup-in-blueprints branch from d878270 to 7a90817 Compare December 9, 2024 13:42
Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

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

Great work on the RFC 🎉 and thanks for being so open and willing for feedback 🙌

@kategengler kategengler merged commit cc27969 into emberjs:master Dec 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Final Comment Period S-Exploring In the Exploring RFC Stage T-ember-cli RFCs that impact the ember-cli library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants