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
eslintのプラグインを作成した話
Search
hirasa
February 08, 2022
1
120
eslintのプラグインを作成した話
eslintのプラグインを作成した話
hirasa
February 08, 2022
Tweet
Share
More Decks by hirasa
See All by hirasa
redux使うのやめました
hirasa
1
470
dev_server_proxyのススメ
hirasa
0
140
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Balancing Empowerment & Direction
lara
0
40
Code Review Best Practice
trishagee
68
18k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
How GitHub (no longer) Works
holman
314
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
720
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
We Have a Design System, Now What?
morganepeng
52
7.6k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
620
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
Transcript
Eslintのプラグインを 作成した話 平崎 葵(ひらさき まもる) 2022/02/08 Saitama.js vol.2発表資料 https://saitamajs.connpass.com/event/233089/
⾃⼰紹介 平崎葵(ひらさきまもる) クーガー株式会社 所属 https://couger.co.jp u フロントエンド、サーバサイドエンジニア u バーチャルヒューマンエージェントの開発 趣味:
ドラム、作曲
発表内容 Eslintのプラグインを作成して、npmパッケージとして公開した話 u どういうものを作ったのか u なぜ作ったのか u どう使うのか u どう作ったのか
どういうものを作ったのか コーディングルールをeslintでチェック ▪npmパッケージ https://www.npmjs.com/package/@hirasaki/eslint-plugin-coding-rules ▪github https://github.com/hirasaki1985/eslint-plugin-coding-rules
なぜ作ったのか コードレビューを⾃動化したい ▪⼀例で、フロント側の設計例 • ServiceやRepository, WebAPIを直接componentから呼び出されたくない • Organisms〜Atomのコンポーネントでreduxを直接使われたくない
どう使うのか u https://github.com/hirasaki1985/eslint-plugin-coding-rules#rule-details Pathの書き⽅はmicromatchを選択。 https://github.com/micromatch/micromatch
どう作ったのか u Typescriptで実装。 u テストはjestを使⽤。 u Buildはtsupを使⽤。 ▪Eslintのプラグインの構成について • metaとcreateから構成されている。
• meta: ルールのメタ情報 • Create: ルールを実装したオブジェクトを返す。 ▪参考 https://eslint.org/docs/developer-guide/working-with-rules
参考 u https://speakerdeck.com/texmeijin/eslintfalsedu-zi-ruruzuo-cheng- nitiyarenzisitahua u https://techblog.yahoo.co.jp/javascript/how-to-create-eslint-rules/ u https://azu.github.io/JavaScript-Plugin-Architecture/ja/ESLint/ 公式 u
https://eslint.org/docs/developer-guide/architecture
エンジニア募集中 https://couger.co.jp/news/career/ カジュアル⾯談実施中︕ u フロントエンドエンジニア u DevOpsエンジニア u AI/機械学習エンジニア u
サーバアプリケーションエンジニア