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
3.1k
Parsing Javascript
brn
14
9.3k
JSON & Object Tips
brn
1
510
CA 1Day Youth Bootcamp for Frontend LT
brn
0
980
Modern TypeScript
brn
2
830
javascript - behind the scene
brn
3
750
tc39 proposals
brn
0
900
プロダクト開発とTypeScript
brn
8
2.9k
React-Springでリッチなアニメーション
brn
1
720
Other Decks in Programming
See All in Programming
Go言語はstack overflowの夢を見るか?
logica0419
0
560
SODA - FACT BOOK(JP)
sodainc
1
8.7k
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.5k
CSC509 Lecture 08
javiergs
PRO
0
250
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
100
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
240
Introduce Hono CLI
yusukebe
6
3.1k
Devvox Belgium - Agentic AI Patterns
kdubois
1
150
技術的負債の正体を知って向き合う
irof
0
250
CSC305 Lecture 08
javiergs
PRO
0
280
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
110
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
630
Featured
See All Featured
For a Future-Friendly Web
brad_frost
180
10k
Scaling GitHub
holman
463
140k
Speed Design
sergeychernyshev
32
1.2k
Documentation Writing (for coders)
carmenintech
75
5.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Thoughts on Productivity
jonyablonski
70
4.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
130k
Designing for humans not robots
tammielis
254
26k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
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
תה ؝٦سךؿؓ٦وحزכⰋג荈⹛⻉ׅװד