Upgrade to Pro — share decks privately, control downloads, hide ads and more …

5分でできる生産性改善~ESLint Custom Rule を作ろう~

Tsuyoshi HARA
November 27, 2021

5分でできる生産性改善~ESLint Custom Rule を作ろう~

JSConf 2021 のスポンサートークで発表したものです。
途中でライブコーディングを挟んでいるのでアーカイブ配信で見てほしいです!
https://jsconf.jp/2021/
https://www.youtube.com/watch?v=Rmvt9Gt0VMk

Tsuyoshi HARA

November 27, 2021
Tweet

More Decks by Tsuyoshi HARA

Other Decks in Programming

Transcript

  1. ©2021 Wantedly, Inc.
    ෼ͰͰ͖Δੜ࢈ੑվળ
    ʙ&4-JOU$VTUPN3VMFΛ࡞Ζ͏ʙ

    View full-size slide

  2. INTERNAL ONLY
    ©2021 Wantedly, Inc.
    5TVZPTIJ)BSB !DIMPF
    w ৬ྺ೥݄ʹத్ೖࣾɻ
    ͨ͘͞ΜϦχϡʔΞϧΛ୲౰͖ͯ͠·ͨ͠ɻ
    ࠷ۙ͸7JTJUͷάϩʔεΛ͍ͯ͠·͢ɻ
    w झຯΪλʔɾ΋͏͙͢ࡀͷ૒ࢠͷ໑ͷ೔ৗಈըΛݟΔ͜ͱ
    ࣗݾ঺հ
    /BPLJ,PCBZBTIJ !LPCBZBOH
    w ৬ྺ೥৽ଔೖࣾɻ
    ΤϯήʔδϝϯτϓϩμΫτͷάϩʔεΛ͍ͯ͠·͢ɻ
    w झຯͳΖ͏খઆΛಡΉ

    View full-size slide

  3. ©2021 Wantedly, Inc.
    5BCMFPGDPOUFOUT
    ن໿ͷॏཁੑ
    &4-JOU
    -JWF$PEJOH
    ·ͱΊ

    View full-size slide

  4. ©2021 Wantedly, Inc.
    ن໿ͷॏཁੑ

    View full-size slide

  5. ©2021 Wantedly, Inc.
    ن໿Λͭ͘ΔϞνϕʔγϣϯ
    ίʔυϕʔεͷ֦େ΍νʔϜ͕εέʔϧͯ͠
    ͍͘தͰ΋ɺੜ࢈ੑߴ͍ঢ়ଶͰɺ඼࣭ɾϨ
    Ϗϡʔͷ͠΍͢͞ͷอূɺόάͷճආΛͯ͠
    ͍͖͍ͨɻ
    ن໿

    View full-size slide

  6. ©2021 Wantedly, Inc.
    ن໿͸࡞͚ͬͨͩͰे෼ʁ
    w ن໿ΛܾΊ͚ͨͩɺυΩϡϝϯτΛ·ͱΊ͚ͨͩͰɺ࣮ࡍ࢖ΘΕͳ͔ͬͨΒҙຯ͕ͳ͍
    w ࡞ͬͨ৔ʹ͍ͳ͔ͬͨਓɺ৽͘͠ೖ͖ͬͯͨਓɺීஈ͋·ΓϑϩϯτΤϯυΛॻ͔ͳ͍ਓ
    w ΈΜͳ͕ඞͣकΕͯͦ͜ن໿ͱܾͯ͠Ίͨҙຯ͕͋Δ
    w ಄Ͱ෼͔͍ͬͯͯ΋ਓؒ͸ϛεΛ͢Δ
    w ࢓૊ΈͰकΕΔΑ͏ʹ͍͖͍ͯͨ͠
    ن໿

    View full-size slide

  7. ©2021 Wantedly, Inc.
    &4-JOU

    View full-size slide

  8. ©2021 Wantedly, Inc.
    &4-JOUͱ͸
    &4-JOU JT B UPPM GPS JEFOUJGZJOH BOE SFQPSUJOH PO
    QBUUFSOT GPVOE JO &$."4DSJQU+BWB4DSJQU DPEF
    XJUIUIFHPBMPGNBLJOHDPEFNPSFDPOTJTUFOU
    BOEBWPJEJOHCVHT
    &4-JOU

    View full-size slide

  9. ©2021 Wantedly, Inc.
    &4-JOUʹ͍ͭͯ
    ͨͱ͑͹ʜ
    /VMMBCMFͳpFMEʹAAΛ͚ͭͯOPOOVMMͳ஋ͱͯ͠ࢀর͍ͯ͠ΔͷΛࢦఠͯ͘͠ΕΔɻ
    ຊདྷ͸OVMMDIFDLΛ͢Δ΂͖ͱ͜Ζɻ
    OVMMDIFDLΛଵͬͨͨΊʹΞϓϦέʔγϣϯ͕Ϋϥογϡ͢Δͱ͍͏Α͏ͳόάͷճආ͕Ͱ͖Δɻ

    View full-size slide

  10. ©2021 Wantedly, Inc.
    ن໿Λ&4-JOUϧʔϧʹ

    View full-size slide

  11. ©2021 Wantedly, Inc.
    ϧʔϧηοτΛ੔උ͢Δ
    &4-JOUΛ࢖ͬͯن໿ΛकΕΔΑ͏ʹ͢Δ
    w ਪ঑ͷϧʔϧηοτΛఏڙͯ͘͠Ε͍ͯΔɻ
    w "JSCOCIUUQTXXXOQNKTDPNQBDLBHFFTMJOUDPOpHBJSCOC
    w /FYUKTIUUQTOFYUKTPSHEPDTCBTJDGFBUVSFTFTMJOU

    View full-size slide

  12. ©2021 Wantedly, Inc.
    ϧʔϧηοτΛ੔උ͢Δ
    &4-JOUΛ࢖ͬͯن໿ΛकΕΔΑ͏ʹ͢Δ
    w 8BOUFEMZͰ΋ࣾ಺༻ͷϧʔϧηοτΛ༻ҙ͍ͯ͠Δ
    w IUUQTHJUIVCDPNXBOUFEMZGSPMJOUUSFFNBTUFSQBDLBHFTFTMJOUDPOpH
    XBOUFEMZUZQFTDSJQU

    View full-size slide

  13. ©2021 Wantedly, Inc.
    ಠࣗͷϧʔϧΛ࡞Δ
    &4-JOUΛ࢖ͬͯن໿ΛकΕΔΑ͏ʹ͢Δ
    w 044ͱͯ͠ఏڙ͞Ε͍ͯΔϧʔϧ͚ͩͰ͸ରԠͰ͖ͳ͍έʔε΋ଘࡏ͢Δ
    w ࣾ಺ಠࣗϧʔϧɾυϝΠϯϩδοΫ͕བྷΉϧʔϧ
    w ಛఆͷػೳͷېࢭ
    w ໋໊نଇͷڧ੍
    ˠΧελϜϧʔϧΛ࡞Γ·͠ΐ͏ɻ

    View full-size slide

  14. ©2021 Wantedly, Inc.
    ͭͬͯ͘ΈΑ͏💪

    View full-size slide

  15. ©2021 Wantedly, Inc.
    &4-JOUͰϧʔϧΛ࡞Δલʹ

    View full-size slide

  16. ©2021 Wantedly, Inc.
    ొ৔ਓ෺
    &4-JOUͰϧʔϧΛ࡞Δલʹ
    w &4-JOU1BSTFS
    w ιʔείʔυΛ"45ʹม׵͢Δ
    w &4-JOU1MVHJO
    w ม׵͞Εͨ"45Λ΋ͱʹϧʔϧηοτΛ࡞Δ
    w 5ZQF4DSJQUʹ-JOU͢Δ৔߹͸!UZQFTDSJQUFTMJOUQBSTFSΛ࢖͏
    w &4-JOU$POpH
    w ϧʔϧηοτͱύʔαʔΛࢦఆ͢Δ

    View full-size slide

  17. ©2021 Wantedly, Inc.
    ϦϙδτϦ
    &4-JOUͰϧʔϧΛ࡞Δલʹ
    w IUUQTHJUIVCDPNLPCBZBOHFTMJOUQMVHJOLPCBZBOHKTDPOGEFNP

    View full-size slide

  18. ©2021 Wantedly, Inc.
    ͓඼ॻ͖
    &4-JOUͰϧʔϧΛ࡞Δલʹ
    w DPNNPOTσΟϨΫτϦʹ͋ΔϑΝΠϧ͸਌ͷJNQPSUΛڐՄ͠ͳ͍
    w ݸผͷυϝΠϯ஌͕ࣝڞ௨ͷϩδοΫʹೖΔ͜ͱΛ๷ࢭ͢ΔͨΊ
    w ಛఆͷϓϨϑΟοΫε͔Β࢝·Δ؀ڥม਺͚ͩΛڐՄ͢Δ
    w ࢀরͰ͖ͳ͍؀ڥม਺͕ೖΔ͜ͱΛ๷ࢭ͢ΔͨΊ

    View full-size slide

  19. ©2021 Wantedly, Inc.
    -JWF$PEJOH

    View full-size slide

  20. ©2021 Wantedly, Inc.
    ·ͱΊ

    View full-size slide

  21. ©2021 Wantedly, Inc.
    ·ͱΊ
    w ن໿Λ࡞Δ͜ͱ͸ੜ࢈ੑΛ্͛ΔͨΊʹॏཁ͕ͩकΒΕͳ͔ͬͨΒҙຯ͕ͳ͍ɻ
    w ࢓૊ΈͰकΔͨΊʹ&4-JOUΛར༻͢Δ͜ͱ͕Ͱ͖Δɻ
    w &4-JOU1MVHJOΛ࣮૷͢Δ͜ͱͰಠࣗͷن໿΋ϧʔϧʹͰ͖Δɻ
    w ن໿Λϧʔϧʹͯ͠ΈΜͳͷੜ࢈ੑΛ͍͋͛ͯ͜͏ɻ

    View full-size slide

  22. ©2021 Wantedly, Inc.
    https://www.wantedly.com/projects/748998
    ࠷ޙʹʜ 8FBSF)JSJOH

    View full-size slide

  23. ©2021 Wantedly, Inc.
    ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ

    View full-size slide