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
May 21, 2022
Programming
0
190
Walking through the source code of an OSS library(ESLint)
kkeeth
May 21, 2022
Tweet
Share
More Decks by kkeeth
See All by kkeeth
とある EM の初めての育休からの学び
clown0082
1
2.8k
The history of Javascript frameworks: changes in front-end design philosophy
clown0082
2
150
Visually experience the beauty of mathematics with p5.js
clown0082
1
2.9k
Rediscover the joy of coding with Creative Coding
clown0082
0
1.5k
全員が意思決定する会社で開発者体験や生産性を見る大変さについて
clown0082
0
590
JavaScript × Mathematics go to Digital Art
clown0082
1
360
In-house study group at YUMEMI
clown0082
0
190
Playing Ionic Logo by p5.js
clown0082
0
260
Skills that employers recommend students to acquire
clown0082
1
290
Other Decks in Programming
See All in Programming
いまさら聞けない生成AI入門: 「生成AIを高速キャッチアップ」
soh9834
12
3.6k
私の愛したLaravel 〜レールを超えたその先へ〜
kentaroutakeda
12
3.4k
Windows版PHPのビルド手順とPHP 8.4における変更点
matsuo_atsushi
0
360
AtCoder Heuristic First-step Vol.1 講義スライド(山登り法・焼きなまし法編)
takumi152
3
970
バックエンドNode.js × フロントエンドDeno で開発して得られた知見
ayame113
5
1.3k
Modern Angular:Renovation for Your Applications @angularDays 2025 Munich
manfredsteyer
PRO
0
130
読もう! Android build ドキュメント
andpad
1
240
英語文法から学ぶ、クリーンな設計の秘訣
newnomad
1
270
複雑なフォームと複雑な状態管理にどう向き合うか / #newt_techtalk vol. 15
izumin5210
4
2.8k
プログラミング教育のコスパの話
superkinoko
0
120
Kubernetesで実現できるPlatform Engineering の現在地
nwiizo
2
1.7k
ベクトル検索システムの気持ち
monochromegane
30
8.8k
Featured
See All Featured
Building Adaptive Systems
keathley
41
2.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
22
2.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
31
4.7k
Done Done
chrislema
183
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.6k
Practical Orchestrator
shlominoach
187
10k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Site-Speed That Sticks
csswizardry
4
450
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
7
610
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.7k
Transcript
Walking through the source code of an OSS library(ESLint)
'SPOUFOE&OHJOFFS-5 #FFS#BTI @kkeeth @kuwahara_jsri @kkeeth
Who am I const my_info = { Name: ‘Kuwahara KEETH
Kiyohito’, Company: ‘Yumemi Inc’, Position: ‘Servant Leader/Board’, Skills: ‘Riot.js/Next.js/Chit-chat’, }
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 😆
one day in development 💁
*NDPODFSOFEBCPVUUIFCFIBWJPS PGUIJTEFQFOEFOUMJCSBSZ🤔 *TOUUIBUBIVSEMFUPCFHJOXJUI $BOZPVSFBMMZSFBEJU me my “inner voice” -FUTSFBEUIFDPEFPGUIJTMJCSBSZ
me
:FT CVU*EPOUVOEFSTUBOEXIBU UIJTMJCSBSZJTEPJOHBOE .BZCFZPVEPOUIBWFUIFUJNF *TUIBUFTTFOUJBMMZXIBUZPVXBOUUP TPMWF me my “inner
voice” *UEFQFOETPOUIFUIJOH CVU JOUFSJNTVQQPSUDBOCFBMJBCJMJUZ MBUFSPO me
#VUFWFOJGZPVVOEFSTUBOEUIF TPVSDFDPEF XIBUEPZPVEPXJUI JU my “inner voice” *GJUTBCVH JUTCFTUUPDSFBUFBO JTTVFPS13
me 8IFOEPZPVUIJOLUIBUXJMMCF SFTPMWFE %PZPVUIJOLJUXJMMCF EPOFPOUJNF my “inner voice”
*GOPU UIFXPSTUUIBUDBOIBQQFOJT UIBUXFGPSLUIFSFQPTJUPSZBOE MPBEUIFDIBOHFT 8IPJTHPJOHUPNBJOUBJOJU 8IBUTUIFDPTU me my “inner
voice” )NNN*HVFTTTP0LBZ MFUT KVTUBTTVNFUIBUTUIFEFTJHOJUT TVQQPTFEUPCF😅 me
*GOPU UIFXPSTUUIBUDBOIBQQFOJT UIBUXFGPSLUIFSFQPTJUPSZBOE MPBEUIFDIBOHFT 8IPJTHPJOHUPNBJOUBJOJU 8IBUTUIFDPTU me my “inner
voice” )NNN*HVFTTTP0LBZ MFUT KVTUBTTVNFUIBUTUIFEFTJHOJUT TVQQPTFEUPCF😅 me none of your business ʘ(^o^)ʗ
I feel like I could learn more from reading codes
😆
Then, let's read the source code of ESLint!
*NBHFCZIUUQTFTMJOUPSH
Basically, we start from the module written in the main
of package.json💁
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
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