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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
2k
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
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
220
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
200
おれのAgentic Coding 2026/03
tsukasagr
1
140
How Swift's Type System Guides AI Agents
koher
0
170
AIエージェントで業務改善してみた
taku271
0
490
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
550
Rethinking API Platform Filters
vinceamstoutz
0
11k
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
310
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
130
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
320
iOS機能開発のAI環境と起きた変化
ryunakayama
0
170
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
480
A Soul's Torment
seathinner
6
2.6k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
400
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
220
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
880
Balancing Empowerment & Direction
lara
5
1k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
190
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
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