mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 18:36:22 +01:00 
			
		
		
		
	Update JS dependencies, adjust eslint config (#17904)
- Update all JS dependencies to latest versions - Add new lint rules, enable es2022 eslint parser features - Disable github/no-then, I feel the rule was too restricting
This commit is contained in:
		| @@ -28,7 +28,7 @@ export function initCommonIssue() { | ||||
|       action, | ||||
|       issueIDs, | ||||
|       elementId | ||||
|     ).then(() => { // eslint-disable-line github/no-then | ||||
|     ).then(() => { | ||||
|       // NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the | ||||
|       // checkboxes stay checked after reload | ||||
|       if (action === 'close' || action === 'open') { | ||||
|   | ||||
| @@ -361,7 +361,7 @@ export function initRepoIssueComments() { | ||||
|       isChecked ? 'detach' : 'attach', | ||||
|       issueId, | ||||
|       id, | ||||
|     ).then(() => window.location.reload()); // eslint-disable-line github/no-then | ||||
|     ).then(() => window.location.reload()); | ||||
|   }); | ||||
|  | ||||
|   $('.dismiss-review-btn').on('click', function (e) { | ||||
|   | ||||
| @@ -162,7 +162,7 @@ export function initRepoCommentForm() { | ||||
|           'clear', | ||||
|           $listMenu.data('issue-id'), | ||||
|           '', | ||||
|         ).then(() => window.location.reload()); // eslint-disable-line github/no-then | ||||
|         ).then(() => window.location.reload()); | ||||
|       } | ||||
|  | ||||
|       $(this).parent().find('.item').each(function () { | ||||
| @@ -205,7 +205,7 @@ export function initRepoCommentForm() { | ||||
|           '', | ||||
|           $menu.data('issue-id'), | ||||
|           $(this).data('id'), | ||||
|         ).then(() => window.location.reload()); // eslint-disable-line github/no-then | ||||
|         ).then(() => window.location.reload()); | ||||
|       } | ||||
|  | ||||
|       let icon = ''; | ||||
| @@ -238,7 +238,7 @@ export function initRepoCommentForm() { | ||||
|           '', | ||||
|           $menu.data('issue-id'), | ||||
|           $(this).data('id'), | ||||
|         ).then(() => window.location.reload()); // eslint-disable-line github/no-then | ||||
|         ).then(() => window.location.reload()); | ||||
|       } | ||||
|  | ||||
|       $list.find('.selected').html(''); | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| /* eslint-disable github/no-then */ | ||||
| const {appSubUrl, csrfToken} = window.config; | ||||
|  | ||||
| export function initUserAuthU2fAuth() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user