Closed mchelen closed 4 years ago
There is no migration plan yet.
Do you mean no migration plan for TSLint in general or for the typescript-starter repo? Would you be interested in seeing PRs to migrate?
We'll probably follow Angular plans in this case. Once they decide to switch to ESLint, we will do the same :)
create-react-app already switched to eslint in its typescript config. Would be nice to see this. @kamilmysliwiec Any reason not to reopen this?
@kamilmysliwiec It seems Angular now plans to switch to ESLint: https://github.com/angular/angular-cli/issues/13732#issuecomment-503722431
Can we reopen this now that TSLint has been deprecated? https://github.com/palantir/tslint/issues/4534
any guide or sample config files for those wanting to use eslint instead of tsling with their nest projects?
I saw a this one on another issue: https://github.com/nestjs/nest/issues/1541
@opensas you could look at the pull request created by IGassmann to get some inspiration. https://github.com/nestjs/typescript-starter/pull/150
I can do it if no one started yet :D
To keep you aligned - we already had some discussion on @IGassmann PR #105 regarding the ESLint migration.
We came to the conclusion that we will wait until Angular CLI migrates to ESLint angular/angular-cli/issues#13732. Therefore we want to follow the future Angular ESLint configuration as close as possible. Since there has not been an official statement yet what configuration Angular is planning to use, this issue is unfortunately blocked
Personally I'd suggest we give it some more time. If Angular does not push forward in the upcoming months, we just start the migration sooner.
My belief is that @JamesHenry and @alexeagle are creating an ESLint configuration based on https://angular.io/guide/styleguide that is compatible with https://github.com/typescript-eslint/typescript-eslint.
Beware that there are still some bugs in eslint-typescript that need to be addressed, ex. https://github.com/typescript-eslint/typescript-eslint/issues/455
Tslint is now marked as deprecated https://github.com/palantir/tslint/releases/tag/6.0.0
Migrated
Thanks, @kamilmysliwiec for the update.
Just felt that it was worth mentioning to the community for devs who have an existing application containing TSLint.
Problem: It was extremely difficult to get the configuration right when trying to upgrade manually (by uninstalling TSLint and then installing ESLint)
Solution:
Using the latest NestJS CLI v 6.14.2 (as of 28 Feb 2020), I was able to get the correct ESLint configuration and the compatible plugins that worked perfectly the nest application. (By creating a new NestJS application nest new app-name
)
After that, all you need to do is
.eslint.js
file and paste into your existing NestJS application..tslint.json
filepackage.json
into your existing NestJS application. (There are several of them)TSLint
That migration should have been done via schematics. Maybe it isn't too late?
It sounds like ESLint is making a major push towards Typescript https://eslint.org/blog/2019/01/future-typescript-eslint
which is supported by the Typescript roadmap https://github.com/Microsoft/TypeScript/issues/29288
Is it ready enough to start switching?