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
420
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
2.7k
Parsing Javascript
brn
12
7.5k
JSON & Object Tips
brn
1
310
CA 1Day Youth Bootcamp for Frontend LT
brn
0
690
Modern TypeScript
brn
2
690
javascript - behind the scene
brn
3
620
tc39 proposals
brn
0
670
プロダクト開発とTypeScript
brn
8
2.7k
React-Springでリッチなアニメーション
brn
1
520
Other Decks in Programming
See All in Programming
How to implement a RubyVM with PHP?
memory1994
PRO
3
1.4k
Datadogのmonitorを Terraform管理に爆速で 移行する
kuro_kurorrr
2
290
The Design of Everyday APIs - PyCon 2024
roguelynn
1
650
Goでリフレクションする、その前に / Kansai.go #1
utgwkk
4
520
Distributed Scheduling with Spring Boot: the challenges and pitfalls of implementing a background job
rponte
1
130
RubyKaigi参加歴をふりかえる / Looking Back on My RubyKaigi Participation History #kaigieffectLT
expajp
2
230
アクセシビリティの観点からみたFluent UI Blazorのすすめ
tomokusaba
1
190
The test code generator using static analysis and LLM
mikik0
1
550
Good intentions gone bad
evaferreira
0
110
From LALR to IELR: A Lrama's Next Step
junk0612
2
1.3k
Upgrading Legacy to the Latest PHP Version
afilina
PRO
0
160
Enjoy Creative Coding with Ruby (RubyKaigi2024)
chobishiba
0
4.8k
Featured
See All Featured
In The Pink: A Labor of Love
frogandcode
138
21k
KATA
mclloyd
16
12k
Building Effective Engineering Teams - LeadDev
addyosmani
34
2k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.6k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Designing for humans not robots
tammielis
247
25k
The Brand Is Dead. Long Live the Brand.
mthomps
49
32k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
How STYLIGHT went responsive
nonsquared
92
4.9k
GitHub's CSS Performance
jonrohan
1025
450k
The World Runs on Bad Software
bkeepers
PRO
61
6.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
228
130k
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
תה ؝٦سךؿؓ٦وحزכⰋג荈⹛⻉ׅװד