Skip to content

revisit prettier automation #2470

Closed
@pkra

Description

@pkra
Member

In #2464 I had re-activated prettier after it had been disabled in #2307.

I don't know if the dry-run option was really relevant. But it disabled the automation and didn't surface the errors. I don't think that was what we wanted.

I'm not sure if the dry-run option was necessary. It looks to me that the failure should be caught by handle-commit-failure anyway?

If it was, then we could change the action to run prettier on commits to main (instead of on PRs).

Alternatively, we could give up on automated formatting and just use dry-run, but surfacing errors (which authors then need to fix).

Or there are other ideas.

Activity

added
editoriala change to an example, note, spelling, grammar, or is related to publishing or the repo
on Mar 7, 2025
moved this from Todo to Agenda+ in ARIA Editorson Mar 12, 2025
pkra

pkra commented on Mar 17, 2025

@pkra
MemberAuthor

In light of https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised (though we luckily don't use tj-actions/changed) perhaps we should reconsider using a third party action.

pkra

pkra commented on Mar 25, 2025

@pkra
MemberAuthor

Aside: I keep seeing "random" small changes like 39412c3 in #2489

I don't know if prettier is at fault or if CI may run different versions.

In any case, it might be worth figuring out a solution that only runs prettier on files with changes.

moved this from Agenda+ to Todo in ARIA Editorson Mar 26, 2025
pkra

pkra commented on Mar 26, 2025

@pkra
MemberAuthor
pkra

pkra commented on Mar 26, 2025

@pkra
MemberAuthor

We want to explore formatting after merge. While there is a chance of introducing merge conflicts, it seems fairly unlikely that formatting will add unexpected merge conflicts - the expectation is that formatting only affects lines that were changed.

@daniel-montalvo I realized it would cause unnecessary respec builds from main. How much of a concern is that?

daniel-montalvo

daniel-montalvo commented on May 21, 2025

@daniel-montalvo
Contributor

Partially addressed in #2536

Still pending is how to handle forks more properly. We are now just throwing an error, which is not very helpful.

6 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

editoriala change to an example, note, spelling, grammar, or is related to publishing or the repo

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @pkra@daniel-montalvo

    Issue actions

      revisit prettier automation · Issue #2470 · w3c/aria