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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Andrey Okonetchnikov
April 21, 2017
Programming
180
0
Share
Make Linting Great Again
Slides from my presentation at React Amsterdam 2017
Andrey Okonetchnikov
April 21, 2017
More Decks by Andrey Okonetchnikov
See All by Andrey Okonetchnikov
Component-Driven Design Systems Workshop
okonet
0
230
A Common Design Language
okonet
2
2.1k
Make Linting Great Again (Long version)
okonet
0
100
Modular CSS v2 (CSS-in-JS edition)
okonet
3
1.1k
Modular CSS — Agent Conf '17 Edition
okonet
3
400
Modular CSS
okonet
3
290
JavaScript для насыщенных пользовательских интерфейсов
okonet
0
120
Профессия "Front-end архитектор"
okonet
0
170
Other Decks in Programming
See All in Programming
Back to the roots of date
jinroq
0
570
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
170
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
320
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
1.1k
PHPer、Cloudflare に引っ越す
suguruooki
1
120
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
250
CDK Deployのための ”反響定位”
watany
5
900
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
290
Spec-driven Development: How AI Changes Everything (And Nothing)
simas
PRO
0
470
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
140
感情を設計する
ichimichi
5
1.6k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
A Soul's Torment
seathinner
6
2.7k
Raft: Consensus for Rubyists
vanstee
141
7.4k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.9k
Design in an AI World
tapps
1
200
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
340
WCS-LA-2024
lcolladotor
0
560
KATA
mclloyd
PRO
35
15k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
410
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