Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Lintでレビューをラクにしよう/ Easing Code Review with Lint ...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
TATSUNO Yasuhiro
April 03, 2019
Programming
690
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lintでレビューをラクにしよう/ Easing Code Review with Lint for TypeScript
名古屋フロントエンドユーザーグループ TypeScript勉強会 での発表です。
https://nfug.connpass.com/event/123497/
TATSUNO Yasuhiro
April 03, 2019
More Decks by TATSUNO Yasuhiro
See All by TATSUNO Yasuhiro
No More NoSuchMethodError
exoego
1
100
ゆくKotlin くるRust
exoego
1
390
Scala 3 で GLSL のための c-like-for を実装してみた
exoego
1
1.1k
Bun に LCOV 出力を実装した
exoego
2
410
terraform-provider-aws にプルリクして マージされるまで
exoego
2
550
ライブラリをパブリッシュせずにすばやく試す
exoego
2
400
esbuild 最適化芸人
exoego
3
2.8k
いい感じに AWS を組み合わせたビルディングブロックでアプリ開発を支援する / TdTechTalk 2022 11
exoego
0
980
Empowering App Dev by Nicely-Crafted High-Level AWS Components
exoego
0
140
Other Decks in Programming
See All in Programming
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
1k
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
Kotlinの15年とServer-Side Kotlin
n_takehata
1
160
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
270
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
2
1.1k
golang-bob.pdf
iwatsukayura
0
130
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Simple Storage Service(S3) is not simple
iwatsukayura
0
300
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.3k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
AmebaブログはKMPから卒業します
kmars0605
0
210
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
810
The Limits of Empathy - UXLibs8
cassininazir
2
730
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Bash Introduction
62gerente
615
220k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
The Cost Of JavaScript in 2023
addyosmani
55
10k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
370
Transcript
Lintでレビューをラクにしよう @exoego 2019-4-3 TypeScript勉強会 #nfug
twitter: @exoego 長野県の田舎でリモートワーク フロントエンドもバックエンドもプロダクトマネージメントもOSSもやるマン コミュニティ Vue i18n Japan AWS User
Group 名古屋支部 名古屋 Java User Group
TypeScriptの型検査 便利!
という話は誰かがして くれるはずなので 違う「検査」を紹介
Lint 使ってますか? 全員使ってたらLT終了
本日のお話 1. Lint の紹介 2. Lint があってよかった実体験 3. TypeScript で
Lint
1. Lint の紹介
重要だけど退屈なレビューに 時間をかけてませんか? コーディングスタイルに従ってる? 未使用コードが残ってる? 古い書き方しちゃってる?
重要だけど退屈なレビューに 時間をかけてませんか? コーディングスタイルに従ってる? 未使用コードが残ってる? 古い書き方しちゃってる? こういうレビューを自動で やってくれるのが Lint(er)
要するに Lint(またはLinter) とは プログラミングの支援ツール。ソースコードを分析し、 様々な問題を検査してくれる 検査は Warning(無視してよい)にもできるし、Error 扱 いにして見逃さず修正にしてもよい 最近の
Lint は、自動修正までやってくれる よくある修正は Lint に任せて 工数節約してコード品質アップ
色々な言語で使える Lint JavaScript: ESLint TypeScript: ESLint, TSLint CSS/altCSS: Stylelint HTML:
htmllint, tidy Markdown: markdownlint Ruby: RuboCop PHP: phplint, PHP_CodeSniffer Python: Pylint, Pycodestyle Java: Checkstyle, SpotBugs Scala: Scalafix
ESLint/TSLint で 見つけられる問題の例 ESLint: no-await-in-loop ルール ループ内の非効率かもしれない await を発見。非同期処理のレビューがラクに ESLint:
no-cond-assign ルール if (foo.bar = ‘message’”) を発見。たまにやらかす… TSLint: no-unsafe-any ルール any型での雑なメンバーアクセス、ダメ絶対。ちゃんとキャストかジェネリクス使って!!
様々な OSS が Pull Req に自動 Lint してレビューコストを下げてる →OSSメンテ続けやすくする仕組み Vue
i18n みんなも自動 Lint でレビューをラクに!
2. Lint があって よかった実体験
とある OSS に ESLint 導入→バグ発見 rules: function (field, rules) {
if (Array.isArray(field)) { $.each(fields, function (index, field) { module.remove.rule(field, rules); }); } else { module.remove.rule(field, rules); } 数年物のバグ、あなたはレビューで見つけられますか? テストがないのが問題だけど
3. TypeScript で Lint
導入デモ TypeScriptの著名レポジトリに Lint 導入して、 見つけた問題を修正 Pull Req してみた …をやろうとしたら、著名レポジトリでは あらかた導入済みだった!
著名レポジトリを参考にしよう!
TSLint派 angular/angular Microsoft/vscode nestjs/nest codercom/code-server grafana/grafana ESLint派 denoland/deno
現在 TypeScript では TSLint がメジャー が、Microsoft は ESLint を推してく らしい
ESLint/TSLint 設定多すぎて迷う? デファクトの設定に従うのがオススメ JavaScript Standard Styleベース https://www.npmjs.com/package/eslint-config-standard https://www.npmjs.com/package/tslint-config-standard 著名企業が公開した設定も広く使われてます https://www.npmjs.com/package/eslint-config-airbnb
https://www.npmjs.com/package/eslint-config-google https://www.npmjs.com/package/tslint-microsoft-contrib
まとめ 退屈なレビューは Lint に任せて、本質的な レビューに集中しよう! TypeScript では TSLint がデファクトだけど JS
にも対応した ESLint もいいよ! Lint の設定は、よく練られたデファクトに 乗っかるとラクだよ!