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
460
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
3.1k
Parsing Javascript
brn
14
9.4k
JSON & Object Tips
brn
1
540
CA 1Day Youth Bootcamp for Frontend LT
brn
0
1k
Modern TypeScript
brn
2
850
javascript - behind the scene
brn
3
790
tc39 proposals
brn
0
940
プロダクト開発とTypeScript
brn
8
3k
React-Springでリッチなアニメーション
brn
1
750
Other Decks in Programming
See All in Programming
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
Oxlintはいいぞ
yug1224
5
1.3k
Oxlint JS plugins
kazupon
1
580
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
120
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
AgentCoreとHuman in the Loop
har1101
5
220
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Side Projects
sachag
455
43k
Why Our Code Smells
bkeepers
PRO
340
58k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
440
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Amusing Abliteration
ianozsvald
0
96
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
The Cult of Friendly URLs
andyhume
79
6.8k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
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
תה ؝٦سךؿؓ٦وحزכⰋג荈⹛⻉ׅװד