prettier 事始め
May 07, 2017
prettier
eslint --fix
が最高だと思っていたがまた新たに formatter が出たので依存する。
eslint-config-prettier
https://github.com/prettier/eslint-config-prettier
-
設定
-
困りごと
- https://github.com/standard/eslint-config-standard に依存している(セミコロン除外)と現状相性が悪い
- issue があるようなので今後見直す
prettier-eslint / prettier-eslint-cli
Code ➡️ prettier ➡️ eslint —fix ➡️ Formatted Code ✨
https://github.com/prettier/prettier-atom に依存して様子を見る。現状若干重い。 上記セミコロン問題の取りこぼしなどがあり鶏卵になる。
TypeScript
- https://github.com/eslint/typescript-eslint-parser とは干渉して動かない
- TypeScript の format も計画されているようで期待
Written by Keisuke Kan who lives and works in Japan building useful things. You should follow him on Twitter