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
470
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Formatting TypeScript
TypeScriptのフォーマットに関して
We Are Javascritpters #13
Taketoshi Aono(青野健利 a.k.a brn)
October 02, 2017
More Decks by Taketoshi Aono(青野健利 a.k.a brn)
See All by Taketoshi Aono(青野健利 a.k.a brn)
document.write再考
brn
6
3.2k
Parsing Javascript
brn
14
9.6k
JSON & Object Tips
brn
1
580
CA 1Day Youth Bootcamp for Frontend LT
brn
0
1.1k
Modern TypeScript
brn
2
880
javascript - behind the scene
brn
3
820
tc39 proposals
brn
0
1k
プロダクト開発とTypeScript
brn
7
3k
React-Springでリッチなアニメーション
brn
1
770
Other Decks in Programming
See All in Programming
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
220
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
440
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
210
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
4.7k
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
150
What's New in Android 2026
veronikapj
0
250
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
480
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
AIが無かった頃の素敵な出会いの話
codmoninc
1
370
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
360
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
130
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
420
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Building an army of robots
kneath
306
46k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
360
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
41k
4 Signs Your Business is Dying
shpigford
187
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Code Reviewing Like a Champion
maltzj
528
40k
Navigating Weather and Climate Data
rabernat
0
440
Deep Space Network (abreviated)
tonyrice
0
250
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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
תה ؝٦سךؿؓ٦وحزכⰋג荈⹛⻉ׅװד