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
Make Linting Great Again
Search
Andrey Okonetchnikov
April 21, 2017
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
250
A Common Design Language
okonet
2
2.1k
Make Linting Great Again (Long version)
okonet
0
120
Modular CSS v2 (CSS-in-JS edition)
okonet
3
1.2k
Modular CSS — Agent Conf '17 Edition
okonet
3
420
Modular CSS
okonet
3
310
JavaScript для насыщенных пользовательских интерфейсов
okonet
0
150
Профессия "Front-end архитектор"
okonet
0
180
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
130
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
150
ActionController meets Protocol Buffers
sorah
1
780
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
14
11k
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
280
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
230
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
160
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
5.1k
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.1k
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
220
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.8k
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
290
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
2
770
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
The Pragmatic Product Professional
lauravandoore
37
7.5k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.4k
Docker and Python
trallard
47
4.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
560
Code Reviewing Like a Champion
maltzj
529
40k
エンジニアに許された特別な時間の終わり
watany
109
250k
Utilizing Notion as your number one productivity tool
mfonobong
4
640
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