Skip to content
New issue

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

By clicking “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? Sign in to your account

Move from TSLint to ESLint #555

Closed
ferk6a opened this issue Oct 20, 2019 · 3 comments
Closed

Move from TSLint to ESLint #555

ferk6a opened this issue Oct 20, 2019 · 3 comments

Comments

@ferk6a
Copy link
Contributor

ferk6a commented Oct 20, 2019

Since TSLint is being deprecated (palantir/tslint#4534), I think we should start to make this move too, both in the projects and also in the cli generated code. I have some configuration based on airbnb-typescript/base (which I can make a PR), but I don't know if it should be the default for new generated applications.

Thoughts?

@LoicPoullain
Copy link
Member

Thank you for submitting this @fer22f. This is a valid issue.

According to the link, TSLint won't accept new features starting from November 1st, 2019 and won't fix security vulnerabilities starting from December 1st, 2020.

Moving to ESLint seems to be the natural choice.


In order to have all the generated code and the examples in the documentation to work with the new ESLint configuration, we need to have by default the same linting rules that we have now. These rules can of course be changed after the project is created if users want to.

I'm not aware of the compatibilities between ESLint and TSLint on TS rules. The migration tool https://github.com/typescript-eslint/tslint-to-eslint-config may take care of that.

So, IMO, so as to make properly the migration, we need to:

  1. Define an ESLint configuration file which is compatible with the current TSLint one: https://github.com/FoalTS/foal/blob/master/packages/cli/src/generate/specs/app/tslint.json.
  2. Once done, update the files generated by the CLI to use ESLint instead of TSLint:
  3. Update the samples/ projects.
  4. Replace all mentions of TSLint with ESLint in the docs/ folder.
  5. Re-write the section Configuring the linting in https://github.com/FoalTS/foal/blob/master/docs/development-environment/vscode.md.
  6. In another time, we can also update the linting used internally to develop the framework. Maybe this can be done in another PR.

Sounds good?

@fer22f Do you want to dig into this?

@ferk6a
Copy link
Contributor Author

ferk6a commented Oct 26, 2019

Yep, I will look into it, I actually didn't know about this tslint-to-eslint-config project!

I think this will certainly be valuable in general, and we can also think about the migration:generate command automatically being lint fixed (they use a slightly different convention for imports in their template).

I will submit some PRs in the coming days.

@LoicPoullain
Copy link
Member

Added in v1.3.0. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants