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
320
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
76
Visually experience the beauty of mathematics with p5.js
clown0082
0
2.4k
Rediscover the joy of coding with Creative Coding
clown0082
0
1.2k
全員が意思決定する会社で開発者体験や生産性を見る大変さについて
clown0082
0
510
JavaScript × Mathematics go to Digital Art
clown0082
1
270
In-house study group at YUMEMI
clown0082
0
140
Playing Ionic Logo by p5.js
clown0082
0
180
Skills that employers recommend students to acquire
clown0082
0
230
Web components these days
clown0082
1
200
Other Decks in Programming
See All in Programming
Rust.Nagoya #1
codemountains
0
170
小さな開発会社を作った理由
polidog
0
1.9k
今こそ始める、CDKコンストラクトライブラリ開発 ― 入門から実践まで
tmokmss
1
930
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
はしめてのプログラミングとロボット制御
watawatavoltage
0
290
さきがけから振り返るアーキテクチャ刷新 / Reflecting on the Architectural Renewal from the Vanguard
nrslib
2
770
スクラムマスターって孤独じゃないですか?
yoshitaroyoyo
1
140
AWSでゲームサーバーを運用! Amazon GameLiftのお話
iriikeita
0
200
Ruby メモリ管理 プログラミング
megmogmog1965
0
130
OpenAI/Gemini APIを使って EPUBを翻訳するCLIツールをつくってみた
tomiyan
0
790
初心者がおさえておきたいAWS CDKのベストプラクティス 2024
konokenj
15
7.3k
Architectures with Lightweight Stores: New Rules and Options
manfredsteyer
PRO
0
100
Featured
See All Featured
Facilitating Awesome Meetings
lara
46
5.8k
Documentation Writing (for coders)
carmenintech
63
4.2k
Pencils Down: Stop Designing & Start Developing
hursman
118
11k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
17
8.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.5k
Git: the NoSQL Database
bkeepers
PRO
423
64k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
360
22k
Thoughts on Productivity
jonyablonski
64
4.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.3k
Embracing the Ebb and Flow
colly
81
4.3k
Art, The Web, and Tiny UX
lynnandtonic
291
20k
Gamification - CAS2011
davidbonilla
78
4.9k
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