Skip to content

Conversation

@silverwind
Copy link
Member

Add eslint-plugin-regexp and fix discovered issues. Config is mostly the recommended one, but I relaxed a few rules.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 26, 2023
@silverwind silverwind added this to the 1.20.0 milestone Apr 26, 2023
@yardenshoham
Copy link
Member

Do the changes you made have any consequences? (gm -> g, removing i)

@silverwind
Copy link
Member Author

No. Errors were:

docs/assets/js/search.js
  141:78  error  Unescaped source character '}'  regexp/strict

web_src/js/features/codeeditor.js
  139:82  error  The 'i' flag is unnecessary because the pattern only contains case-invariant characters  regexp/no-useless-flag

web_src/js/utils.js
  35:34  error  The 'm' flag is unnecessary because the pattern does not contain start (^) or end ($) assertions  regexp/no-useless-flag

The two flag cases where autofixed actually, the unescaped } is the only potentially breaking one but I verified it matches what I think it matches before and after: https://regex101.com/r/AjKChp/1

@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 Apr 26, 2023
@silverwind silverwind added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Apr 26, 2023
@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 Apr 26, 2023
@techknowlogick techknowlogick added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 27, 2023
@techknowlogick techknowlogick enabled auto-merge (squash) April 27, 2023 01:02
@techknowlogick techknowlogick merged commit 50133b0 into go-gitea:main Apr 27, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 27, 2023
@silverwind silverwind deleted the eslint-plugin-regexp branch April 27, 2023 05:27
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 28, 2023
* giteaofficial/main: (26 commits)
  Refactor docs (go-gitea#23752)
  Fix layouts of admin table / adapt repo / email test  (go-gitea#24370)
  Move secrets and runners settings to actions settings (go-gitea#24200)
  Gitea Actions add `base_ref`, `head_ref`, `api_url`, `ref_type` fields (go-gitea#24356)
  Fix auth check bug (go-gitea#24382)
  Display 'Unknown' when runner.version is empty (go-gitea#24378)
  Fix incorrect last online time in runner_edit.tmpl (go-gitea#24376)
  Refactor "route" related code, fix Safari cookie bug (go-gitea#24330)
  Add custom helm repo name generated from url (go-gitea#24363)
  Add API for gitignore templates (go-gitea#22783)
  Add eslint-plugin-regexp (go-gitea#24361)
  Support uploading file to empty repo by API (go-gitea#24357)
  [skip ci] Updated translations via Crowdin
  Require repo scope for PATs for private repos and basic authentication (go-gitea#24362)
  Alert error message if open dependencies are included in the issues that try to batch close (go-gitea#24329)
  Fix 404 error when leaving the last private org team (go-gitea#24322)
  Modify width of ui container, fine tune css for settings pages and org header (go-gitea#24315)
  Add .livemd as a markdown extension (go-gitea#22730)
  Display when a repo was archived (go-gitea#22664)
  Fix wrong error info in RepoRefForAPI (go-gitea#24344)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 31, 2023
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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/code-linting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants