2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Prettier デバッグ

Posted at

Prettier の開発をするときのデバッグ方法。

test.*.gitignore に入ってるので、フォーマットしたいファイルを test.js みたいに作れる、拡張子はなんでもいい(作っても git 管理の対象にならない)。

また、Flow や TypeScript、Babel を介さないと使えないプロポーザル を使って書かれているわけではないので、トランスパイル等せずに普通に Node.js で実行できる(今の master だと Node 8 以上、 next ブランチだと Node 10 以上)。
なので、src以下を変更しても

$ ./bin/prettier.js test.js

みたいにやってあげれば、変更された Prettier でtest.jsのフォーマットができる。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?