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

Add typescript guideline and typescript-specific eslint plugins and fix issues #31521

Merged
merged 8 commits into from
Jul 3, 2024

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 28, 2024

  1. Add some general guidelines how to write our typescript code
  2. Add @typescript-eslint/eslint-plugin, general typescript rules
  3. Add eslint-plugin-deprecation to detect deprecated code
  4. Fix all new lint issues that came up

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 28, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 28, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 28, 2024
@delvh delvh added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/testing topic/ui Change the appearance of the Gitea UI and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 28, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 29, 2024
@silverwind silverwind marked this pull request as draft June 29, 2024 12:43
@silverwind
Copy link
Member Author

silverwind commented Jun 29, 2024

I think we should try to run the TS eslint rules on JS before the migration because that will allow the migration to be pure renames. Not sure if that is really possible already but I will try. If the diff is to big, it will be in a separate PR.

@silverwind silverwind marked this pull request as ready for review June 30, 2024 17:26
@silverwind
Copy link
Member Author

silverwind commented Jun 30, 2024

@typescript-eslint now runs on JS files as well and has detected 7 new issues, one of them being a regression from #31186, which I also fixed.

Ready for review again.

@silverwind silverwind requested review from jolheiser July 2, 2024 23:18
@silverwind
Copy link
Member Author

@jolheiser odd, your review does not show up properly:

image

Copy link
Member

@jolheiser jolheiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second time's the charm?

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 3, 2024
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 3, 2024
@silverwind silverwind merged commit 2c92c7c into go-gitea:main Jul 3, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Jul 3, 2024
@silverwind silverwind deleted the tslint branch July 3, 2024 15:48
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 3, 2024
@silverwind
Copy link
Member Author

Next and final step in the typescript journey: #31559

zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 5, 2024
* giteaofficial/main:
  Fix slow patch checking with commits that add or remove many files (go-gitea#31548)
  Add typescript guideline and typescript-specific eslint plugins and fix issues (go-gitea#31521)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/dependencies modifies/docs modifies/internal modifies/js size/L Denotes a PR that changes 100-499 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants