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
Walking through the source code of an OSS Libra...
Search
kkeeth
July 16, 2022
Programming
0
400
Walking through the source code of an OSS Library(ESLint))
kkeeth
July 16, 2022
Tweet
Share
More Decks by kkeeth
See All by kkeeth
Programming to play with p5.js
clown0082
0
15
とある EM の初めての育休からの学び
clown0082
1
3.7k
The history of Javascript frameworks: changes in front-end design philosophy
clown0082
2
170
Visually experience the beauty of mathematics with p5.js
clown0082
1
3k
Rediscover the joy of coding with Creative Coding
clown0082
0
1.6k
全員が意思決定する会社で開発者体験や生産性を見る大変さについて
clown0082
0
610
JavaScript × Mathematics go to Digital Art
clown0082
1
390
In-house study group at YUMEMI
clown0082
0
210
Playing Ionic Logo by p5.js
clown0082
0
280
Other Decks in Programming
See All in Programming
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
980
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
110
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
150
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
250
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
560
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
400
GraphRAGの仕組みまるわかり
tosuri13
8
500
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
440
5つのアンチパターンから学ぶLT設計
narihara
1
120
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
290
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
120
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Statistics for Hackers
jakevdp
799
220k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
We Have a Design System, Now What?
morganepeng
53
7.7k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Done Done
chrislema
184
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
Typedesign – Prime Four
hannesfritz
42
2.7k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Building an army of robots
kneath
306
45k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Transcript
Walking through the source code of an OSS library(ESLint)
l4VNNFS+BWB4DSJQU'FTUJWBM0OMJOFz @kkeeth @kuwahara_jsri @kkeeth
While looking back on a day 💁
*`NBMFBEFOHJOFFSPSUFDIMFBE *WFDSFBUFEB13 QMFBTFSFWJFX me Team Member A 0,👍*`MMSFWJFXBOEGFFECBDLZPV me
5IFOVNCFSPGNFNCFSTBOE13TIBT JODSFBTFE TP*TIPVMEDPODFOUSBUFPOMZ POSFWJFXJOH OPUJNQMFNFOUJOH *WFDSFBUFEB13 QMFBTFSFWJFX me Team Member
B, C … 0,👍*`MMSFWJFXBOEGFFECBDLZPV me
1MFBTFSBUFUIJTDBOEJEBUFTDPEF Recruitment Personnel *`NBTFSWBOUMFBEFSPGPGBDSPTTFBDI FOHJOFFSJOHHSPVQ me *`NBNFNCFSPGUIF#PBSE me
me 0,👍*`MMSFWJFXBOEGFFECBDLZPV *TUPQQFEXSJUJOHNPSFBOENPSFDPEF *GZPVPOMZSFBEDPEF DBUDIJOHVQXJUIOFX UFDIOPMPHJFTTVDIBTMJCSBSJFTBOEGSBNFXPSLTUFOET UPCFTVQFS fi DJBM4Pʜ *GFFMmy
technical skills have declined… Voice of my heart
me 0,👍*`MMSFWJFXBOEGFFECBDLZPV *TUPQQFEXSJUJOHNPSFBOENPSFDPEF *GZPVPOMZSFBEDPEF DBUDIJOHVQXJUIOFX UFDIOPMPHJFTTVDIBTMJCSBSJFTBOEGSBNFXPSLTUFOET UPCFTVQFS fi DJBM4Pʜ *GFFMmy
technical skills have declined… Voice of my heart I've got to do something ʘ(^o^)ʗ
I feel like I could learn more from reading codes
😆
About me
Published 📙
OQNKTDPNdLLFFUI
🙇 Sorry … 🙇 This slide is written in English.
However, I am still learning English, and there may be some inappropriate expressions. Plz feedback for me called “Masakari” about my talk!!
Let’s start 😆
Then, let's read the source code of ESLint!
*NBHFCZIUUQTFTMJOUPSH
Basically, we start from the module written in the main
of package.json💁
This is the main one. This is a so-called controller
💁
This is the module that actually does the work 💁
As the name implies, it is a helper or preparation
for testing. It includes many things 💁
This one is just like the name. This is a
collection of processes that handle source code. 💁
Next, let’s look at “bin” dir.
Only 3 helper functions and an executable function here💁
None
Next, let’s look at “lib/cli.js” fi le.
None
“cli.js” depends on “ESLint” module “ESLint” module depends on “CLIEngine”
module
I found out later that...
There exists a dependency map💁 *NBHFCZIUUQTHJUIVCDPNFTMJOUFTMJOUCMPCNBJOEPDTTSDEFWFMPQFSHVJEFBSDIJUFDUVSFEFQFOEFODZTWH
Knowledge 1: Overall design
Unified format for writing each module📝
Uni fi ed format for writing each module
Uni fi ed format for writing each module
util objects rich in methods📝
w /PEFKTlVUJMzPCKFDU w MJCSVMFTVUJMTBTUVUJMT w MJCTIBSFETUSJOHVUJMT w MJCTIBSFETBTUVUJMT NFUIPET SFHHFYQBUUFSOT
w MJCTPVSDFDPEFUPLFOTUPSFVUJMT the number of using methods
Knowledge 2: Node.js’s “util” module is useful
w VUJMJOTQFDU w VUJMGPSNBU w VUJMJOIFSJUT w VUJMMQSPNJTJGZ ˡ8IBUTVSQSJTFENFXBTUIJT Methods
used by ESLint
*NBHFCZIUUQTOPEFKTPSHBQJVUJMIUNM
Knowledge 3: Generator functions in JavaScript
Do you understand the following code?💁
None
None
Let's take a look at some sample codes💁
None
None
None
more detail, show MDN👉
An afterthought
An afterthought w /PUXSJUUFOJOUZQFTDSJQU UZQFEF fi OJUJPOTBSFXSJUUFO w "OZXBZ
UIFEPDVNFOUBUJPOJTFYUFOTJWF w +4%PDJTXFMMEPDVNFOUFE BTJTNE w %PDVNFOUBUJPOJTVTJOH&MFWFOUZKT UZ w 5PPMTGPS44( w %PDVNFOUBUJPOBQQJTFBTJFSUPWJFXUIBOUIFP ff i DJBMTJUF w 5IFSFBSFBMTPDPODFQUTPGMBZPVUBOEDPNQPOFOUT
None
None
Thoughts💁
Thoughts w 8FEPOUIBWFUPVOEFSTUBOEJUUPUBMZ👍 w %FTJHOJOHGBNPVTMJCSBSJFTJTBHSFBUMFBSOJOHFYQFSJFODF👍 w 8FDBOJNQSPWFNZTLJMMTGPSTVSF👍 w *GZPV fi
OEJUEJ ff i DVMU ZPVDBOSFBEJUXJUITPNFPOFFMTF👍 w *GZPVIBWFUSPVCMF JU`THPPEUPSFBEGSPNUIFUFTUDPEF👍
None