Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Make Linting Great Again
Search
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
220
A Common Design Language
okonet
2
1.9k
Make Linting Great Again (Long version)
okonet
0
82
Modular CSS v2 (CSS-in-JS edition)
okonet
3
1.1k
Modular CSS — Agent Conf '17 Edition
okonet
3
380
Modular CSS
okonet
3
280
JavaScript для насыщенных пользовательских интерфейсов
okonet
0
110
Профессия "Front-end архитектор"
okonet
0
160
Other Decks in Programming
See All in Programming
関数実行の裏側では何が起きているのか?
minop1205
1
710
JETLS.jl ─ A New Language Server for Julia
abap34
1
420
愛される翻訳の秘訣
kishikawakatsumi
3
330
sbt 2
xuwei_k
0
300
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
520
AIコーディングエージェント(skywork)
kondai24
0
180
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
140
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
190
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
850
AIコーディングエージェント(Gemini)
kondai24
0
240
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.9k
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
730
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Docker and Python
trallard
47
3.7k
It's Worth the Effort
3n
187
29k
What's in a price? How to price your products and services
michaelherold
246
13k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
The Cult of Friendly URLs
andyhume
79
6.7k
Code Review Best Practice
trishagee
74
19k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Raft: Consensus for Rubyists
vanstee
141
7.2k
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