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

叱られて覚えるES2015

 叱られて覚えるES2015

YAP(achimon)C::Asia Hachioji 2016 LT 発表資料

046baac588d91fd78a85b189847a151d?s=128

Sota Sugiura

July 02, 2016
Tweet

Transcript

  1. ࣤΒΕ֮ͯ͑Δ &4 !TPUB :"1 BDIJNPO $"TJB)BDIJPKJ-JHIUJOH5BML

  2. ࣗݾ঺հ w !TPUB w +4ྺ೥ w ޷͖ͳݴ༿ɿ7 w ݏ͍ͳݴ༿ɿ*OUFSOFU&YQMPSFS

  3. &4

  4. &4 w ࡢ೥ϦϦʔε͞Εͨ&$."4DSJQUͷ৽͍͠όʔ δϣϯ w ʲॕʳ&4΋͜ͷલग़ͨΑ

  5. &4ͱͷҧ͍ w લճόʔδϣϯ͔Βͷมߋ͕ΊͪΌͪ͘Όଟ͍ w ྆खͷࢦͰऩ·Βͳ͍਺ͷ৽ػߏ͕ʜ w ࠓ·ͰͭΒ͔ͬͨ+4ͷ໰୊ͷଟ͕͘ղܾ͞Εͨ

  6. #VU ৽ػೳଟ͓͗͢΅͑ΒΕͳ͍ʜ Ňŏ﹏ŏ

  7. /FXGFBUVSFT w DPOTUMFU w BSSPXGVODUJPO w PCKFDUMJUFSBM w DMBTTTZOUBY w

    1SPYZ w 4ZNCPM w FYQPSUJNQPSU w TQSFBEPQFSBUPS w EFGBVMUQBSBNFUFS w BOENPSF ꒪⌓꒪
  8. ֮͑Δͷେมʜ

  9. ͜͏͍͏࣌Ͳ͏͖͚ͯͨͬ͠ʜ ɾТɾʆ

  10. ࠓ·Ͱͷਓੜ w ॓୊

  11. ࠓ·Ͱͷਓੜ w ॓୊ˠࣤΒΕ͔ͯΒ΍Δ

  12. ࠓ·Ͱͷਓੜ w ॓୊ˠࣤΒΕ͔ͯΒ΍Δ w Ոࣄ

  13. ࠓ·Ͱͷਓੜ w ॓୊ˠࣤΒΕ͔ͯΒ΍Δ w ՈࣄˠࣤΒΕ͔ͯΒ΍Δ

  14. ࠓ·Ͱͷਓੜ w ॓୊ˠࣤΒΕ͔ͯΒ΍Δ w ՈࣄˠࣤΒΕ͔ͯΒ΍Δ w डݧษڧ

  15. ࠓ·Ͱͷਓੜ w ॓୊ˠࣤΒΕ͔ͯΒ΍Δ w ՈࣄˠࣤΒΕ͔ͯΒ΍Δ w डݧษڧˠࣤΒΕ͔ͯΒ΍Δ

  16. ࠓ·Ͱͷਓੜ w ॓୊ˠࣤΒΕ͔ͯΒ΍Δ w ՈࣄˠࣤΒΕ͔ͯΒ΍Δ w डݧษڧˠࣤΒΕ͔ͯΒ΍Δ w ࢓ࣄ

  17. ࠓ·Ͱͷਓੜ w ॓୊ˠࣤΒΕ͔ͯΒ΍Δ w ՈࣄˠࣤΒΕ͔ͯΒ΍Δ w डݧษڧˠࣤΒΕ͔ͯΒ΍Δ w ࢓ࣄˠࣤΒΕ͔ͯΒຊؾͩ͢

  18. ʮ͓ࣤΓʯͦ͜Ϟνϕʔγϣϯ w ਓ͸ࣤΒΕΔͱؤுΕΔ w զʑͷۀքͰ͸ SZ

  19. ٹੈओΛ୳͢ʜ +4จ๏Λࣤͬͯ͘ΕΔਓ͸͍ͳ͍ͩΖ͏͔

  20. ٹੈओΛ୳͢ʜ +4จ๏Λࣤͬͯ͘ΕΔਓ͸͍ͳ͍ͩΖ͏͔

  21. &4-JOU w +BWB4DSJQUͷจ๏νΣοΧʔ w ඇৗʹ๛෋ͳϧʔϧ͕༻ҙ͞ΕͯΔ w ଞͷਓͷϧʔϧϑΝΠϧΛJNQPSU͢Δ͜ͱ͕Մೳ

  22. ͍ΖΜͳϧʔϧ w FTMJOUDPOpHFTMJOU w FTMJOUDPOpHBJSCOC w FTMJOUDPOpHHPPHMF w FTMJOUDPOpHTUBOEBSE w

    FUD
  23. FTMJOUDPOpHBJSCOC w &4༻ϧʔϧΛҰ൪࠷ॳʹ࡞Γ࢝Ίͨ w ਓؾϧʔϧ w &4ه๏Ͱॻ͘ͱΊͪΌͪ͘ΌౖΒΕΔ w IUUQTHJUIVCDPNBJSCOCKBWBTDSJQUCMPCNBTUFS QBDLBHFTFTMJOUDPOpHBJSCOCCBTFSVMFTFTKT

  24. ͯ͜ͱͰ w "JSCOCϧʔϧͰ&4Λ֮͑Δ

  25. ҧ͏ ʄшʄ ސ٬ͷٻΊͯΔ΋ͷ͸ͦ͏͡Όͳ͍

  26. ސ٬ͷຊ౰ʹඞཁͩͬͨ΋ͷ ʴ

  27. ސ٬ͷຊ౰ʹඞཁͩͬͨ΋ͷ ⋵ ʴ

  28. ͜͜·Ͱ͸৺ߏ͑ͷ࿩ ࣮ࡍʹࢼͯ͠ΈΔ

  29. ਓப w IUUQTHJUIVCDPNTPUB1BSUZ w 3FBDU /PEFKTͷੲॻ͍ͨΞϓϦΛνΣοΫ ͢Δ

  30. *OTUBMM $ npm i -D eslint \ eslint-config-airbnb \ eslint-plugin-import

    \ eslint-plugin-react
  31. FTMJOUSD { "extends": "airbnb" }

  32. $PNNBOE $ ./node_modules/eslint/bin/eslint.js src/ # or $ npm run lint

    # package.jsonͰ”eslint src/“Λఆٛ
  33. %&.0

  34. ݁Ռ w ίʔυྔ͸ߦ w ͷΤϥʔͱͷܯࠂ͕ग़ͨ w զʑͷۀքE SZ

  35. &4༝དྷͷΤϥʔ • Unexpected var, use let or const instead •

    'option' is never reassigned, use 'const' instead • Expected property shorthand
  36. &4༝དྷͷΤϥʔ • Unexpected var, use let or const instead •

    'option' is never reassigned, use 'const' instead • Expected property shorthand WBS͡Όͳͯ͘MFU DPOTUΛ࢖͑ ࠶୅ೖ͠ͳ͍ͳΒDPOTU࢖͑ 0CKFDUTIPSUIBOEͰॻ͚Δͥ
  37. ଞʹ΋ʜ w ඇৗʹଟ͘ͷϧʔϧ͕ఆٛ͞Ε͍ͯΔ w ஌ͬͯΔه๏Ͱؤுͬͯॻ͍ͯɺ࿙Εͨ΋ͷΛ &4-JOUʹࣤͬͯ΋Β͏ͱΑ͍

  38. ·ͱΊ

  39. େࣄͳͷ͸Ϟνϕʔγϣϯ w ࣤΒΕΔͱؤுΕΔ w ࣤͬͯ͘ΕΔ͜ͱΛ͝๙ඒͩͱࢥ͑͹΋ͬͱؤ ுΕΔ w &4-JOUʹࣤͬͯ΋Βָͬͯ͘͠&4ֶश

  40. Ҏ্ɺղࢄʂ