Skip to content

Eslint #275

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

Merged
merged 8 commits into from
Nov 9, 2021
Merged

Eslint #275

merged 8 commits into from
Nov 9, 2021

Conversation

gnikit
Copy link
Member

@gnikit gnikit commented Nov 9, 2021

Changes

  • Adds elint support and drops tslint as a dep
  • Formats all repo files using prettier and eslint (.ts, .json, .md) with reasonable settings
  • Fixes the hook which was previously broken
  • Adds linting as part of our CI

Fixes Change tslint to eslint #260
The lint-stage hook sould now be able to work when we commit.
If a commit fails then run `npm run lint-fix` to try and autofix
and then `npm run format`.

All of these actions should be run
automatically via the git hook but I am listing the steps in case
the hook fails.
@gnikit gnikit mentioned this pull request Nov 9, 2021
@gnikit gnikit self-assigned this Nov 9, 2021
@gnikit gnikit linked an issue Nov 9, 2021 that may be closed by this pull request
VSCode had trouble parsing the `printWidth` and kept defaulting
to 100 which in turn caused the formatter in VSCode to produce
different results than `npm run format`.

An autofix attempt has also been added when `lint-stage`ing
@gnikit
Copy link
Member Author

gnikit commented Nov 9, 2021

@krvajal You might want to have a look but given that these are changes brought by the linting/formatting tools along with normal maintenance work it is not that important. I will be merging this branch soon, once I manage to update the husky git hook from v4 to v7.

@gnikit
Copy link
Member Author

gnikit commented Nov 9, 2021

I will leave the husky to v4 because I would have to update my local npm version to 7.x. Last time I did that I had problems with compiling the extension and hence I had to revert.
The procedure is highlighted in https://github.com/typicode/husky-4-to-7

@gnikit gnikit merged commit ae77ee2 into master Nov 9, 2021
@gnikit gnikit deleted the eslint branch November 9, 2021 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change tslint to eslint
1 participant