diff options
author | silverwind <me@silverwind.io> | 2021-12-03 22:43:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-04 14:43:14 +0800 |
commit | f7094c81617f4e826f49f6835b3da68e5c4a58fe (patch) | |
tree | aa9b974512ec9786722525829ba03cd11cd11af1 /web_src | |
parent | c7c723c5482e5278b13c2b72ce34907d240ed284 (diff) | |
download | gitea-f7094c81617f4e826f49f6835b3da68e5c4a58fe.tar.gz gitea-f7094c81617f4e826f49f6835b3da68e5c4a58fe.zip |
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
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/features/common-issue.js | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-issue.js | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-legacy.js | 6 | ||||
-rw-r--r-- | web_src/js/features/user-auth-u2f.js | 1 |
4 files changed, 5 insertions, 6 deletions
diff --git a/web_src/js/features/common-issue.js b/web_src/js/features/common-issue.js index 07086d9e63..577abc1870 100644 --- a/web_src/js/features/common-issue.js +++ b/web_src/js/features/common-issue.js @@ -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') { diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index b224245fdf..4f1365c1b2 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -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) { diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index 5904b3ce22..d8530fe24f 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -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(''); diff --git a/web_src/js/features/user-auth-u2f.js b/web_src/js/features/user-auth-u2f.js index 8951c8a4ab..30876a1d03 100644 --- a/web_src/js/features/user-auth-u2f.js +++ b/web_src/js/features/user-auth-u2f.js @@ -1,4 +1,3 @@ -/* eslint-disable github/no-then */ const {appSubUrl, csrfToken} = window.config; export function initUserAuthU2fAuth() { |