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
84
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
AIコーディングエージェント(Gemini)
kondai24
0
270
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
630
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
190
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
130
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
Cap'n Webについて
yusukebe
0
150
クラウドに依存しないS3を使った開発術
simesaba80
0
160
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
160
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.3k
Deno Tunnel を使ってみた話
kamekyame
0
240
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
Implementation Patterns
denyspoltorak
0
110
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
0
63
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
51
43k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Agile that works and the tools we love
rasmusluckow
331
21k
A Tale of Four Properties
chriscoyier
162
23k
Unsuck your backbone
ammeep
671
58k
Highjacked: Video Game Concept Design
rkendrick25
PRO
0
250
WCS-LA-2024
lcolladotor
0
390
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
So, you think you're a good person
axbom
PRO
0
1.8k
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