Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Roadmap: TSLint -> ESLint #4534

Description

@adidahiya

As you may have read in this blog post, we plan to deprecate TSLint in 2019 and support the migration to ESLint as the standard linter for both TypeScript & JavaScript. This will not be an immediate deprecation; on the contrary, there is a lot of work to do to ensure a smooth transition to the new tooling without any regressions. There are features, test suites, and conveniences in TSLint which we hope to retain in the migration. There may be a period of time when there is overlap between the two tools and TSLint early adopters are recommended to run both linters to ensure full code check coverage (to a reasonable degree such that performance doesn't suffer drastically).

I will be closing some feature requests in this repo which now feel out of scope because we expect them to be handled in the ESLint / typescript-eslint roadmap. One example of a category of rules for which new feature requests are most likely to be closed / rejected is formatting rules. I have suggested splitting out these rules for quite some time because we use Prettier at Palantir and consider it a better tool for the job of formatting code.

TSLint will continue to release with important bug fixes and updates which keep it up-to-date with the latest compiler / language features.


Update (June 2019): a more concrete roadmap timeline, coordinated with @JoshuaKGoldberg and tslint-contrib-microsoft:

  • August 1st, 2019: Stop accepting new core rules. Still accept bug fixes, minor features, and rule enhancements. Custom rules are always an option and can be maintained outside this repo.
  • November 1st, 2019: Stop accepting features or rule enhancements (with the exception of ones that make migrating to typescript-eslint easier). Still accept bug fixes.
  • January 1st, 2020: Stop accepting anything except security fixes and fixes for crashes introduced by breaking TypeScript changes.
  • December 1st, 2020: Stop accepting any PRs 🎉

Update (August 2019): see tslint-to-eslint-config for a CLI command that migrates TSLint configuration files to ESLint configuration files.


Update (March 2020): Added "and fixes for crashes introduced by breaking TypeScript changes" to the January 1st deadline, following discussion in #4914.

Activity

  1. felixfbecker commented on Feb 23, 2019

    @felixfbecker

    I would be great to have a CLI command that migrates a tslint.json to an eslint.json, mapping equivalent rules and options. Ideally it would remove rules that can be migrated from tslint.json and keep rules that don't have an equivalent yet (or not support the used options), so that the rule can be run idempotently repeatedly over time until tslint.json becomes empty at some point and we can fully rely on ESLint.

  2. hinell commented on Feb 26, 2019

    @hinell

    Good news.
    ESLint guys already started typescript-eslint project to support TS.
    They are also looking for help. Here is the statement..

  3. cyberhck commented on Mar 13, 2019

    @cyberhck

    what will writing tslint rules mean after the migration? On tslint I'm happy to write new rules, because it's easy as tslint itself uses typescript and I know type of data while writing rule.

    Is there plan to migrate eslint from JS to TS? If not then writing rule will be a bit harder. I hate to say it but if eslint isn't migrated to ts, it'd not be as pleasant to write rules.

    My bad, it's not eslint we'll be using, we'll be using typescript-eslint, makes more sense. let me know if I can be of any help.

  4. joeyj-msft commented on Apr 6, 2019

    @joeyj-msft

    would it be possible to reference this plan to deprecate from the readme.md in the repo? It seems only certain people know about this plan and isn't common knowledge. Thanks!

  5. JoshuaKGoldberg commented on Apr 7, 2019

    @JoshuaKGoldberg
    Contributor

    @joeyj-msft indeed, added in a395501 by adidahiya.

  6. Maximebpro commented on May 2, 2019

    @Maximebpro

    It would be nice to have some "recap" of TSLint rules (https://palantir.github.io/tslint/rules/) available in typescript-eslint. Don't know if it should be a "ESLint" flag on palantir or a new list on https://github.com/typescript-eslint/typescript-eslint. But it would help decide if a project is ready to move or not.

  7. JoshuaKGoldberg commented on May 2, 2019

    @JoshuaKGoldberg
    Contributor
  8. aggmoulik commented on Jun 5, 2019

    @aggmoulik

    @JoshuaKGoldberg I am shifting from tslint to typescript-eslint. I was using TSLint to create custom rules for my project. How can I proceed on creating custom rules as same we did in TSLint?

    My Project create Javascript as well as Typescript files so I have to create just single rule for them?

  9. JoshuaKGoldberg commented on Jun 5, 2019

    @JoshuaKGoldberg
    Contributor

    @moulikcipherX thanks for asking, great questions!

    You can use your TSLint rules within ESLint using typescript-eslint/packages/eslint-plugin-tslint. It wraps a TSLint configuration and lints your code using TSLint.

    To write rules in ESLint, see typescript-eslint/packages/eslint-plugin. That README.md has a list of all their supported rules (the list has gotten pretty big!). The ROADMAP.md there has a mapping of existing TSLint rules to the new equivalents.

  10. aggmoulik commented on Jun 5, 2019

    @aggmoulik

    Thank You @JoshuaKGoldberg.

    So I can further use the same methods for creating custom rules for TypeScript same as in TSLint.

  11. adidahiya commented on Jun 5, 2019

    @adidahiya
    ContributorAuthor

    Note: I've just updated the original post in this thread with a more concrete roadmap timeline. Scroll to the top of this page to see it.

  12. 71 remaining items

  13. added a commit that references this issue on Oct 19, 2020
  14. added a commit that references this issue on Oct 31, 2020
  15. PRR24 commented on Oct 31, 2020

    @PRR24

    As we are reaching the EOL of the software, it would be awesome, if each rule document would have a link to the replacement rule in typescript-eslint documentation, just like typescript-eslint does in reverse.

  16. added a commit that references this issue on Nov 6, 2020
  17. added a commit that references this issue on Dec 29, 2020
  18. shaileshsutar88 commented on Jan 7, 2021

    @shaileshsutar88

    Does this mean I won't be able to use tslint in my projects after 1st jan 2021? Currently my builds are using tslint. I don't see any command to install tslint on npm website. And it says tslint is deprecated now. Can someone please address my queries?

    Thank you.

  19. Shinigami92 commented on Jan 7, 2021

    @Shinigami92
    Contributor

    You can use it, but you wont get any kind of support in any way.
    Also no more updates.
    So yes, you should move forward to eslint.

  20. beenotung commented on Feb 10, 2021

    @beenotung

    As my last checkout, tslint support more types of auto fixing, so I recommend to run 'tslint --fix' before running eslint.

    Things may have changed in the meanwhile.

  21. philiprgbel commented on Feb 27, 2021

    @philiprgbel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions