Skip to content

Switch to ESLint? #69

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Closed
mchelen opened this issue Jan 30, 2019 · 16 comments
Closed

Switch to ESLint? #69

mchelen opened this issue Jan 30, 2019 · 16 comments
Labels

Comments

@mchelen
Copy link
Contributor

mchelen commented Jan 30, 2019

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
microsoft/TypeScript#29288

Is it ready enough to start switching?

@kamilmysliwiec
Copy link
Member

There is no migration plan yet.

@mchelen
Copy link
Contributor Author

mchelen commented Jan 31, 2019

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?

@kamilmysliwiec
Copy link
Member

We'll probably follow Angular plans in this case. Once they decide to switch to ESLint, we will do the same :)

@jleclanche
Copy link

create-react-app already switched to eslint in its typescript config. Would be nice to see this. @kamilmysliwiec Any reason not to reopen this?

@AntoineDoubovetzky
Copy link

@kamilmysliwiec It seems Angular now plans to switch to ESLint: angular/angular-cli#13732 (comment)

@mchelen
Copy link
Contributor Author

mchelen commented Sep 9, 2019

Can we reopen this now that TSLint has been deprecated? palantir/tslint#4534

@opensas
Copy link

opensas commented Oct 16, 2019

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: nestjs/nest#1541

@Rogn
Copy link

Rogn commented Oct 16, 2019

@opensas you could look at the pull request created by IGassmann to get some inspiration. #150

@karenkgs
Copy link

I can do it if no one started yet :D

karenkgs pushed a commit to karenkgs/typescript-starter that referenced this issue Oct 31, 2019
karenkgs pushed a commit to karenkgs/typescript-starter that referenced this issue Oct 31, 2019
karenkgs pushed a commit to karenkgs/typescript-starter that referenced this issue Oct 31, 2019
karenkgs pushed a commit to karenkgs/typescript-starter that referenced this issue Oct 31, 2019
karenkgs pushed a commit to karenkgs/typescript-starter that referenced this issue Oct 31, 2019
karenkgs pushed a commit to karenkgs/typescript-starter that referenced this issue Oct 31, 2019
@BrunnerLivio
Copy link
Member

BrunnerLivio commented Oct 31, 2019

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.

@IGassmann
Copy link

IGassmann commented Oct 31, 2019

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.

@j3bb9z
Copy link

j3bb9z commented Dec 3, 2019

Beware that there are still some bugs in eslint-typescript that need to be addressed, ex.
typescript-eslint/typescript-eslint#455

@leosuncin
Copy link

Tslint is now marked as deprecated https://github.com/palantir/tslint/releases/tag/6.0.0

@kamilmysliwiec
Copy link
Member

Migrated

@nechar
Copy link

nechar commented Feb 28, 2020

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

  • copy the new .eslint.js file and paste into your existing NestJS application.
  • delete the existing .tslint.json file
  • install the related ESLint packages that are listed in package.json into your existing NestJS application. (There are several of them)
  • uninstall TSLint

@KingDarBoja
Copy link

That migration should have been done via schematics. Maybe it isn't too late?

No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.