Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Formatting TypeScript
Taketoshi Aono(青野健利 a.k.a brn)
October 02, 2017
Programming
1
400
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)
CA 1Day Youth Bootcamp for Frontend LT
brn
0
290
Modern TypeScript
brn
2
540
javascript - behind the scene
brn
3
460
tc39 proposals
brn
0
480
プロダクト開発とTypeScript
brn
8
2.4k
React-Springでリッチなアニメーション
brn
1
420
javascript internationalization API
brn
0
500
How V8 executes WASM
brn
3
1.3k
memory_in_javascript.pdf
brn
0
660
Other Decks in Programming
See All in Programming
ECサイトの脆弱性診断をいい感じにやりたい/OWASPKansaiNight_LT1_220727
owaspkansai
0
300
How to Test Your Compose UI (Droidcon Berlin 2022)
stewemetal
1
130
Lookerとdbtの共存
ttccddtoki
0
670
ちょっとつよい足トラ
logilabo
0
420
ExplainableAIの概要とAmazon SageMaker Clarifyでの実装例
hacarus
0
110
レビュー駆動学習のススメ_StaPy#83
soogie
0
330
Another 40 years of Commodore 64
mehowte
0
110
夕食断食にTRY!/for-lt-12th
pachikuriii
0
250
Edge Side Frontend という新領域
mizchi
24
10k
atama plusの開発チームはどのように「不確実性」に向き合ってきたか〜2022夏版〜
atamaplus
3
650
Amazon SageMakerでImagenを動かして猫画像生成してみた
hotoke_neko
0
130
Windows コンテナ Dojo 第5回 OpenShift で学ぶ Kubernetes 入門
oniak3ibm
PRO
0
200
Featured
See All Featured
Building Adaptive Systems
keathley
25
1.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
29
4.4k
How To Stay Up To Date on Web Technology
chriscoyier
780
250k
Gamification - CAS2011
davidbonilla
75
3.9k
Building a Scalable Design System with Sketch
lauravandoore
448
30k
Making Projects Easy
brettharned
99
4.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
235
1.1M
5 minutes of I Can Smell Your CMS
philhawksworth
196
18k
Designing Experiences People Love
moore
130
22k
A Tale of Four Properties
chriscoyier
149
21k
Building Applications with DynamoDB
mza
84
4.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
15
3.9k
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
תה ؝٦سךؿؓ٦وحزכⰋג荈⹛⻉ׅװד