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

TSLint will be deprecated. Migration to typescript-eslint / #kansaits 2

TSLint will be deprecated. Migration to typescript-eslint / #kansaits 2

Masashi Hirano

September 06, 2019
Tweet

More Decks by Masashi Hirano

Other Decks in Programming

Transcript

  1. TSLint
    will be deprecated
    Migration to typescript-eslint
    Masashi Hirano @shisama
    kansai.ts #2

    View full-size slide

  2. ฏ໺ ণ࢜ / Masashi Hirano
    αΠϘ΢ζגࣜձࣾ
    ɹɹ ϑϩϯτΤϯυΤΩεύʔτνʔϜ
    @shisama_
    @shisama
    Node.js Core Collaborator
    ؔ੢NodeֶԂOrganizer

    View full-size slide

  3. Agenda
    • TSLint Roadmap
    • typescript-eslint
    • Migration to typescript-eslint

    View full-size slide

  4. https://palantir.github.io/tslint/

    View full-size slide

  5. TSLint
    • TypeScript༻ͷ੩తղੳπʔϧ
    • CLIΛ࣮ߦ͢ΔͱTypeScriptͷϑΝΠϧͷղੳΛͯ͠ఆٛͨ͠
    ϧʔϧΛνΣοΫ͢Δ͜ͱ͕Ͱ͖Δπʔϧ
    • Πϯσϯτͱ͔ίʔυͷελΠϧͷνΣοΫͳͲ
    • ϩδοΫͷෳࡶ౓ͳͲ΋νΣοΫͰ͖Δ

    View full-size slide

  6. ΊͬͪΌศརͳΜ͚ͩͲɺ
    2019೥ϝϯςφϯεΛऴྃ͠·͢

    View full-size slide

  7. https://github.com/Microsoft/TypeScript/issues/29288

    View full-size slide

  8. https://github.com/Microsoft/TypeScript/issues/29288
    54-JOU͸ύϑΥʔϚϯε͕ѱ͍ɻΞʔΩς
    Ϋνϟ্ʹ໰୊͕͋Δ͔Β5ZQF4DSJQUͱͯ͠͸
    &4-JOUΛ࢖͍ͬͯ͘Α

    View full-size slide

  9. https://github.com/palantir/tslint
    54-JOUXJMMCFEFQSFDBUFETPNFUJNFJO

    View full-size slide

  10. https://github.com/palantir/tslint/issues/4534

    View full-size slide

  11. https://github.com/palantir/tslint/issues/4534

    View full-size slide

  12. TSLint Roadmap
    • 2019/8/1ɾɾɾίΞͷϧʔϧ௥ՃΛετοϓ
    • 2019/11/1ɾɾɾػೳ௥Ճɺϧʔϧ֦ுΛετοϓ
    • 2020/1/1ɾɾɾηΩϡϦςΟҎ֎ͷߋ৽Λ͢΂ͯετοϓ
    • 2020/12/1ɾɾɾ͢΂ͯͷPull Requestͷड෇Λετοϓ

    View full-size slide

  13. https://github.com/typescript-eslint/typescript-eslint

    View full-size slide

  14. typescript-eslintͱ͸
    • TypeScriptΛESLintͰνΣοΫ͢ΔͨΊͷϓϥάΠϯͳͲΛ؅ཧ
    ͍ͯ͠Δ
    • ESLintνʔϜͱTypeScriptνʔϜ͕ڠྗ͍ͯ͠Δ
    • ΋ͱ΋ͱ͋ͬͨeslint/typescript-eslint-parserͳͲ͸Deprecated

    View full-size slide

  15. https://teppeis.hatenablog.com/entry/2019/02/typescript-eslint
    UZQFTDSJQUFTMJOUͷ࢖͍ํͳͲ͸ͪ͜Β΁

    View full-size slide

  16. Migrate to typescript-eslint
    • ҎԼͷύοέʔδ͕ඞཁ
    • @typescript-eslint/eslint-plugin
    • tslint.jsonΛ.eslintrcʹॻ͖׵͑Δඞཁ͕͋Δ

    View full-size slide

  17. https://teppeis.hatenablog.com/entry/2019/02/typescript-eslint
    QMVHJOTɺQBSTFSɺQBSTFS0QUJPOTͷઃఆ͕ඞཁ

    View full-size slide

  18. https://github.com/typescript-eslint/tslint-to-eslint-config

    View full-size slide

  19. tslint-to-eslint-configͱ͸
    • tslint.jsonΛ.eslintʹίϯόʔτ͢ΔCLIπʔϧ
    • typescript-eslintνʔϜ͕։ൃ
    • ੜ੒͢Δܗࣜ͸JSΦϒδΣΫτͱJSONΛαϙʔτ
    • npx tslint-to-eslint-configΛ࣮ߦ͢Δͱtslint.jsonΛಡΜͰeslintrc.js
    ͱ͍͏ϑΝΠϧΛੜ੒͠·͢

    View full-size slide

  20. https://qiita.com/shisama/items/b3d63142797b07cb554e
    ϑΝΠϧ໊ͷࢦఆ΍+40/ग़ྗͳͲ
    Φϓγϣϯʹ͍ͭͯ͸ͪ͜Β΁

    View full-size slide

  21. https://qiita.com/shisama/items/b3d63142797b07cb554e
    ͱ͸͍͑ɺ׬ᘳͰ͸ͳ͍ʂ
    ੜ੒͞ΕͨFTMJOUSDΛ
    खͰमਖ਼͢Δඞཁ͕͋ΔͷͰ஫ҙʂ

    View full-size slide

  22. ·ͱΊ
    • TSLint࢖͍ͬͯΔਓ͸ૣΊʹESLintʹҠߦ͢Δඞཁ͕͋Δ
    • ࠓޙ͸typescript-eslint + ESLintͰTypeScriptͷLintΛ͠·͠ΐ͏
    • tslint-to-eslint-configΛ࢖͏ͱҠߦ͸ΘΓͱεϜʔζʹ͍͔͘΋
    • typescript-eslintνʔϜ։ൃͳͷͰվળ͞Ε͍ͯ͘ͷΛظ଴

    View full-size slide

  23. Thanks.
    @shisama_
    @shisama

    View full-size slide