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 Library(ESLint))
Search
kkeeth
July 16, 2022
Programming
0
300
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
1
52
Visually experience the beauty of mathematics with p5.js
clown0082
0
2.2k
Rediscover the joy of coding with Creative Coding
clown0082
0
1.1k
全員が意思決定する会社で開発者体験や生産性を見る大変さについて
clown0082
0
480
JavaScript × Mathematics go to Digital Art
clown0082
1
240
In-house study group at YUMEMI
clown0082
0
120
Playing Ionic Logo by p5.js
clown0082
0
150
Skills that employers recommend students to acquire
clown0082
0
210
Web components these days
clown0082
1
180
Other Decks in Programming
See All in Programming
Ruby on Fails - effective error handling with Rails conventions
talyssonoc
0
200
Native Federation: The Future of Micro Frontends in Angular
manfredsteyer
PRO
0
130
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
690
Fragment Composition of GraphQL
quramy
13
1.6k
Try creating your own orderedmap
kazamori
1
270
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
290
見た目から始める生産性向上
ikumatadokoro
10
1.5k
CREってこういうこと? 体験入社 - 提案資料 - / what-is-cre-trial-employment
shinden
1
570
Ruby Pattern Matching
bkuhlmann
0
940
PostmanでAPIの動作確認が楽になった話
h455h1
0
190
Folding Cheat Sheet #4
philipschwarz
PRO
0
100
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
1.1k
Featured
See All Featured
Infographics Made Easy
chrislema
238
18k
Unsuck your backbone
ammeep
664
57k
The Cost Of JavaScript in 2023
addyosmani
21
3.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
22
1.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
KATA
mclloyd
16
12k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
47k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
275
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
What’s in a name? Adding method to the madness
productmarketing
PRO
17
2.7k
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