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
350
Walking through the source code of an OSS Library(ESLint))
kkeeth
July 16, 2022
Tweet
Share
More Decks by kkeeth
See All by kkeeth
The history of Javascript frameworks: changes in front-end design philosophy
clown0082
2
99
Visually experience the beauty of mathematics with p5.js
clown0082
1
2.7k
Rediscover the joy of coding with Creative Coding
clown0082
0
1.3k
全員が意思決定する会社で開発者体験や生産性を見る大変さについて
clown0082
0
550
JavaScript × Mathematics go to Digital Art
clown0082
1
310
In-house study group at YUMEMI
clown0082
0
160
Playing Ionic Logo by p5.js
clown0082
0
210
Skills that employers recommend students to acquire
clown0082
1
260
Web components these days
clown0082
1
240
Other Decks in Programming
See All in Programming
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
230
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
Amazon Qを使ってIaCを触ろう!
maruto
0
410
Realtime API 入門
riofujimon
0
150
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Click-free releases & the making of a CLI app
oheyadam
2
120
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.5k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
subpath importsで始めるモック生活
10tera
0
310
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Designing the Hi-DPI Web
ddemaree
280
34k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
100
What's new in Ruby 2.0
geeforr
343
31k
Faster Mobile Websites
deanohume
305
30k
Docker and Python
trallard
40
3.1k
Become a Pro
speakerdeck
PRO
25
5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
The Pragmatic Product Professional
lauravandoore
31
6.3k
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