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
450
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
14
9.2k
JSON & Object Tips
brn
1
490
CA 1Day Youth Bootcamp for Frontend LT
brn
0
940
Modern TypeScript
brn
2
800
javascript - behind the scene
brn
3
740
tc39 proposals
brn
0
870
プロダクト開発とTypeScript
brn
8
2.9k
React-Springでリッチなアニメーション
brn
1
690
Other Decks in Programming
See All in Programming
業務自動化をJavaとSeleniumとAWS Lambdaで実現した方法
greenflagproject
1
120
複数アプリケーションを育てていくための共通化戦略
irof
10
4k
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
120
WindowInsetsだってテストしたい
ryunen344
1
190
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
220
從零到一:搭建你的第一個 Observability 平台
blueswen
1
960
技術懸念に立ち向かい 法改正を穏便に乗り切った話
pop_cashew
0
1.5k
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
2
540
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
22
6.2k
単体テストの始め方/作り方
toms74209200
0
510
XSLTで作るBrainfuck処理系
makki_d
0
210
プロダクト開発でも使おう 関数のオーバーロード
yoiwamoto
0
160
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Agile that works and the tools we love
rasmusluckow
329
21k
Producing Creativity
orderedlist
PRO
346
40k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
For a Future-Friendly Web
brad_frost
179
9.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Designing for Performance
lara
609
69k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Making Projects Easy
brettharned
116
6.2k
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
תה ؝٦سךؿؓ٦وحزכⰋג荈⹛⻉ׅװד