Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Prettier enhancements: feedback/state & options

Aperta
#176 1 commento 0 reazioni 3 assegnatari Vedi su GitHub

@kiraarghy ci sta già lavorando.

Dal 13/1/2020.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

I think it would be useful to have some discussion about the prettier functionality on runpkg. Some points to start with:

  1. Button press feedback
  2. Undo option
  3. Basic config options

1: button press feedback and state

Currently it can be hard to tell that any formatting has taken place. Although this function (prettier.format) isn't async, I think some state handling (including start & finish state) in the UI would be helpful. In my mind, possible states to alert the user to are:

  • start format
  • finish/successful format
  • finished format with no change (prettier.format(fileData.code, opts) === fileData.code)
  • error
  • format reverted (see point number 2)

These states could be signified with text, icons and/or toast messages. Preferences? I would lean towards (accessibly) icons possibly enhanced with toast messages.

2: undo format

I think it would be useful to be able to revert the code formatting without having to refresh the page. I'm happy to implement it in a PR. Any objections? Any opinions on how to represent this has successfully run in the context of point number 1 (above)?

3: basic config

This is a trickier and more subjective feature IMO: one one hand, prettier is supposed to be opinionated, but - on the other - it does provide certain config options (quotes, semi...) for a reason. Do we want to allow users to select basic config options? E.g. currently we use the default options which include singleQuote: false which means that something like lodash-es/add only changes on format due to single -> double quotes rather than any major formatting issues.

Lingua principale
JavaScript
Stelle
307
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FormidableLabs/runpkg

Tutte le issue di FormidableLabs/runpkg

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.