Repository navigation
Roadmap: TSLint -> ESLint #4534
Description
Activity
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.
Reacted by Adi Dahiya, Josh Ghoulberg 👻, Jakub Beneš, Philipp Foedermayr, Glen, hinell, Rostislav Listerenko, Beto Muniz, Sean Zhu, Anton Petkov and 441 moreReacted by thesaloncorp, Mona Hasselskog, Artemii, Sebastian Riedel, Timmy Huang, Krisztián Balla and Ladislav M.Reacted by Tristan, Dmitri, Mona Hasselskog, Sebastian Riedel, Timmy Huang, Yurii Holskyi, Aashutosh Rathi, Magnus Markling, Markoz Peña, Nandy Legorreta and 2 moreReacted by Maksym Kobieliev, Beto Muniz, Anton Petkov, Spencer Kaiser, Lorenz Leutgeb, Pavlos Vinieratos, Trevor Coleman, Brendan Quinn, adrianrivers, Adhityan K V and 50 moreReacted by adrianrivers, Felix Hungenberg, Luis Lopes, Dmitri, Mona Hasselskog, Toni Villena, Aanand Kainth, Lorenzo Pieri, Matthieu Vion, Artemii and 15 moreReacted by Luckz, Mona Hasselskog, Ryo Ota, Rhys Lloyd, VladislavMedved, Sebastian Riedel, Mr Bones, jtang-ml, Timmy Huang, Keith Alan Pounds and 7 moreGood news.
ESLint guys already started typescript-eslint project to support TS.
They are also looking for help. Here is the statement..Reacted by Søren Østergaard, Sanatbek Matlatipov, Lea Reimann, Eric R, Dan Petitt, xiaodeaux, Dmitri, Max Sysoev, sewil, Rafał Pocztarski and 17 more- pinned this issue
on Mar 2, 2019 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.
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!
Reacted by Dave, Josh Ghoulberg 👻, Adi Dahiya, Noah Allen, Adam Wamai Egesa, Simon Kurtz, Charles Xu, SnowFlowers, Simon Bobrov, Skillz4Killz and 3 more@joeyj-msft indeed, added in a395501 by adidahiya.
Reacted by Joey JIt 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.Reacted by Carsten Dietzel, Sylvain Dumont, Chris and Adam Wamai Egesa- Reacted by Jagdeep Singh, Maxime Bernard, Thu San and Junior DussouillezReacted by Chris, Adam Wamai Egesa, Jagdeep Singh and Maxime Bernard
@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?
@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.
Reacted by Eric Pan, Slin Lee, Adam Wamai Egesa, Moulik Aggarwal, Luis Lopes, Alex Burner and Drew LustroThank You @JoshuaKGoldberg.
So I can further use the same methods for creating custom rules for TypeScript same as in TSLint.
Reacted by Josh Ghoulberg 👻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.
Reacted by Rafał PocztarskiReacted by Josh Ghoulberg 👻, falfia falfiya, Slin Lee, Jessica Franco, Adam Wamai Egesa, Oskar Klintrot and Moulik Aggarwal71 remaining items
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.
Reacted by Nelson Martell, Reuben Turk, Eric McCormick, garysoed, Marek Grzybek, Gergely Sipos, ✅ Daniel Danielecki, kjteh, mhagnumdw, Raul Ferreira and 7 moreDoes 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.
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.Reacted by Adi Dahiya, Nelson Martell, Shailesh Sutar and v1rtlAs 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.
- added 3 commits that reference this issue
on Feb 14, 2021
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:
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.