Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Formatting TypeScript
Search
Taketoshi Aono(青野健利 a.k.a brn)
October 02, 2017
Programming
1
440
Formatting TypeScript
TypeScriptのフォーマットに関して
We Are Javascritpters #13
Taketoshi Aono(青野健利 a.k.a brn)
October 02, 2017
Tweet
Share
More Decks by Taketoshi Aono(青野健利 a.k.a brn)
See All by Taketoshi Aono(青野健利 a.k.a brn)
document.write再考
brn
6
3k
Parsing Javascript
brn
13
9.1k
JSON & Object Tips
brn
1
440
CA 1Day Youth Bootcamp for Frontend LT
brn
0
870
Modern TypeScript
brn
2
770
javascript - behind the scene
brn
3
710
tc39 proposals
brn
0
820
プロダクト開発とTypeScript
brn
8
2.8k
React-Springでリッチなアニメーション
brn
1
650
Other Decks in Programming
See All in Programming
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
270
Unity Android XR入門
sakutama_11
0
160
Immutable ActiveRecord
megane42
0
140
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
GoとPHPのインターフェイスの違い
shimabox
2
190
Grafana Cloudとソラカメ
devoc
0
180
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
770
GAEログのコスト削減
mot_techtalk
0
120
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
370
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
0
190
Featured
See All Featured
Statistics for Hackers
jakevdp
797
220k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
We Have a Design System, Now What?
morganepeng
51
7.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Gamification - CAS2011
davidbonilla
80
5.1k
Into the Great Unknown - MozCon
thekraken
35
1.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Facilitating Awesome Meetings
lara
52
6.2k
Music & Morning Musume
bryan
46
6.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
It's Worth the Effort
3n
184
28k
Transcript
Formatting TypeScript
せ: @brn (ꫬꅿ⨳ⵃ) 耵噟: ؿٗٝزؒٝسؒٝآص،٥ط؎ذ؍ـؒٝآص، ⠓爡: Cyberagent ،سذؙأةآؔRightSegment٥AI Messenger ـؚٗ:
http://abcdef.gets.b6n.ch/ Twitter: https://twitter.com/brn227 GitHub: https://github.com/brn
鳞ְֿה ؝٦ر؍ؚٝ鋉秈⡲ֻזְկ ٖؽُ٦׃ֻזְկ
tslintָ֮ ֽוְְׇfixתד׃ַ׃גֻזְկ
prettier ׅ׀ֻؿؓ٦وحز׃גֻתׅיկ
Conflict ֮ծֽוֿֿtslintהעאַגתׅי…
tslint-plugin-prettier conflictׅٕ٦ٕכ搀⸬ח׃ת׃׳ֲկֲ׃ת׃׳ֲկ
tslint׃䘌 ➂דַׅיկ pre-commitؿحؙ剅ֹת׃׳ֲ
#!/bin/sh! ! for file in $(git diff --cached --name-only --diff-
filter=ACM | grep '\.tsx\?$' | tr '\n' ' ')! do! echo "prettier $file";! # Prettify all staged .js files! ./node_modules/.bin/tslint $file -c ./tslint.json -- exclude 'src/**/*.css' --project tsconfig.json --fix! ! # Add back the modified/prettified files to staging! git add $file! ! done!
husky and lint-staged 荈ⴓד剅ֻ״嚂דׅיկ huskyדpre-commit鏣㹀׃גlint-stagedדlint剅ֻ
TypeScriptFormatter https://github.com/vvakame/typescript-formatter @vvakameָׁ⡲װא LanguageService⢪גؿؓ٦وحز׃תׅ
None
תה ؝٦سךؿؓ٦وحزכⰋג荈⹛⻉ׅװד