Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Prettier enhancements: feedback/state & options

オープン
#176 コメント 1 件 リアクション 0 件 担当者 3 名 GitHub で見る

@kiraarghy がすでに取り組んでいます。

2020年1月13日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
JavaScript
スター
307
フォーク
9
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

FormidableLabs/runpkg のほかの issue

FormidableLabs/runpkg の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。