Repository navigation
Roadmap: TSLint -> ESLint #4534
Description
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
felixfbecker commentedon Feb 23, 2019
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.
hinell commentedon Feb 26, 2019
Good news.
ESLint guys already started typescript-eslint project to support TS.
They are also looking for help. Here is the statement..
cyberhck commentedon Mar 13, 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.
joeyj-msft commentedon Apr 6, 2019
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!
JoshuaKGoldberg commentedon Apr 7, 2019
@joeyj-msft indeed, added in a395501 by adidahiya.
Maximebpro commentedon May 2, 2019
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.JoshuaKGoldberg commentedon May 2, 2019
@Maximebpro see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/ROADMAP.md 👍
feat: switch to eslint due to palantir/tslint#4534
feat: switch to eslint due to palantir/tslint#4534
aggmoulik commentedon Jun 5, 2019
@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?
JoshuaKGoldberg commentedon Jun 5, 2019
@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.
aggmoulik commentedon Jun 5, 2019
Thank You @JoshuaKGoldberg.
So I can further use the same methods for creating custom rules for TypeScript same as in TSLint.
adidahiya commentedon Jun 5, 2019
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.
70 remaining items
Dependencies Update, Includes Typescript4
Remove tslint.json
PRR24 commentedon Oct 31, 2020
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.
Remove tslint.json
use yarn
shaileshsutar88 commentedon Jan 7, 2021
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.
Shinigami92 commentedon Jan 7, 2021
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.
beenotung commentedon Feb 10, 2021
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.
Switch to ESLint instead of TSLint (see: palantir/tslint#4534 (comment))
Switch to ESLint instead of TSLint (see: palantir/tslint#4534 (comment))
Switch to ESLint instead of TSLint (see: palantir/tslint#4534 (comment))
❌ undock tsconfig.json file (palantir/tslint#4534)
philiprgbel commentedon Feb 27, 2021
Bump transitive dep eslint up until we move from tslint to eslint
Bump typescript from 4.1.3 to 4.2.3 in /dashboard (#2512)