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
Make Linting Great Again
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Andrey Okonetchnikov
April 21, 2017
Programming
0
170
Make Linting Great Again
Slides from my presentation at React Amsterdam 2017
Andrey Okonetchnikov
April 21, 2017
Tweet
Share
More Decks by Andrey Okonetchnikov
See All by Andrey Okonetchnikov
Component-Driven Design Systems Workshop
okonet
0
230
A Common Design Language
okonet
2
2k
Make Linting Great Again (Long version)
okonet
0
98
Modular CSS v2 (CSS-in-JS edition)
okonet
3
1.1k
Modular CSS — Agent Conf '17 Edition
okonet
3
390
Modular CSS
okonet
3
280
JavaScript для насыщенных пользовательских интерфейсов
okonet
0
120
Профессия "Front-end архитектор"
okonet
0
170
Other Decks in Programming
See All in Programming
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
13
7.5k
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
500
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
200
ぼくの開発環境2026
yuzneri
1
290
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
170
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
110
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
230
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
120
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
310
CSC307 Lecture 12
javiergs
PRO
0
450
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
360
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
910
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
1
2.5M
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
190
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
460
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
120
Ethics towards AI in product and experience design
skipperchong
2
210
SEO for Brand Visibility & Recognition
aleyda
0
4.3k
The browser strikes back
jonoalderson
0
740
Bash Introduction
62gerente
615
210k
What's in a price? How to price your products and services
michaelherold
247
13k
KATA
mclloyd
PRO
35
15k
Transcript
Make Linting Great Again! with @okonetchnikov
What the lint?!
–Wikipedia “lint or a linter is any tool that flags
suspicious usage in software written in any computer language.”
Why lint?
You don’t need to uglify your code if it’s already
ugly!
Using lint tools leads to 1. Fewer bugs 2. Better
readability => less time for code reviews 3. Faster development
– http://www.prweb.com/releases/2013/1/prweb10298185.htm “On average, software developers spend 50% of their
time finding and fixing bugs.”
– http://www.prweb.com/releases/2013/1/prweb10298185.htm “…this inefficiency is estimated to cost the global
economy $312 billion per year.”
None
How to lint?
Stylelint JSON Lint
—Faster development?! —Really?!
None
None
None
None
None
None
None
None
None
Raise your hand if this sound familiar to you ✋
None
None
None
None
– Everyone “I wish I could lint before committing the
changes to the repository”
None
git hooks are 1. Hard to setup 2. Hard to
manage 3. Hard to share across the team
npm install -D husky yarn add --dev husky
{ "scripts": { "precommit": "eslint ." } }
None
git hooks are 1. Hard to setup 2. Hard to
manage 3. Hard to share across the team 4. Slow 5. Displaying irrelevant results
Meet lint-staged!
npm install -D lint-staged yarn add --dev lint-staged
{ "scripts": { "precommit": "lint-staged" } }
{ "scripts": { "precommit": "lint-staged" }, "lint-staged": { "*.js": "eslint"
} }
None
git hooks are 1. Hard to setup 2. Hard to
manage 3. Hard to share across the team 4. Very slow 5. Displaying irrelevant results AWE S OM E!
There is more!
Automatically fix lint errors
{ "lint-staged": { "*.js": [ "eslint --fix", "git add" ]
} }
Automatically reformat your code
{ "lint-staged": { "*.js": [ "prettier --write", "git add" ]
} }
None
lint-staged and prettier being used in create-react-app
None
https://github.com/okonet/lint-staged
Please solve real problems!
Thank You!
Andrey Okonetchnikov @okonetchnikov http://okonet.ru https://github.com/okonet