loading up the forgejo repo on tangled to test page performance

Enforce trailing comma in JS on multiline (#30002)

To keep blame info accurate and to avoid [changes like
this](https://github.com/go-gitea/gitea/pull/29977/files#diff-c3422631a14edbe1e508c4b22f0c718db318be08a6e889427802f9b6165d88d6R359),
it's good to always have a trailing comma, so let's enforce it in JS.

This rule is completely automatically fixable with `make lint-js-fix`
and that's what I did here.

(cherry picked from commit 3d751b6ec18e57698ce86b79866031d2c80c2071)

Conflicts:
web_src/js/components/DashboardRepoList.vue
trivial context conflict because of '3b7b899afa fix commit_status'

authored by silverwind and committed by Earl Warren b96845ae 9c9f40f6

+1 -1
.eslintrc.yaml
··· 119 119 "@stylistic/js/arrow-spacing": [2, {before: true, after: true}] 120 120 "@stylistic/js/block-spacing": [0] 121 121 "@stylistic/js/brace-style": [2, 1tbs, {allowSingleLine: true}] 122 - "@stylistic/js/comma-dangle": [2, only-multiline] 122 + "@stylistic/js/comma-dangle": [2, always-multiline] 123 123 "@stylistic/js/comma-spacing": [2, {before: false, after: true}] 124 124 "@stylistic/js/comma-style": [2, last] 125 125 "@stylistic/js/computed-property-spacing": [2, never]
+1 -1
playwright.config.js
··· 27 27 * Maximum time expect() should wait for the condition to be met. 28 28 * For example in `await expect(locator).toHaveText();` 29 29 */ 30 - timeout: 2000 30 + timeout: 2000, 31 31 }, 32 32 33 33 /* Fail the build on CI if you accidentally left test.only in the source code. */
+1 -1
tools/generate-images.js
··· 20 20 'removeDimensions', 21 21 { 22 22 name: 'addAttributesToSVGElement', 23 - params: {attributes: [{width: size}, {height: size}]} 23 + params: {attributes: [{width: size}, {height: size}]}, 24 24 }, 25 25 ], 26 26 });
+2 -2
tools/generate-svg.js
··· 39 39 attributes: [ 40 40 {'xmlns': 'http://www.w3.org/2000/svg'}, 41 41 {'width': '16'}, {'height': '16'}, {'aria-hidden': 'true'}, 42 - ] 43 - } 42 + ], 43 + }, 44 44 }, 45 45 ], 46 46 });
+5 -5
web_src/js/components/ActionRunStatus.vue
··· 10 10 props: { 11 11 status: { 12 12 type: String, 13 - required: true 13 + required: true, 14 14 }, 15 15 size: { 16 16 type: Number, 17 - default: 16 17 + default: 16, 18 18 }, 19 19 className: { 20 20 type: String, 21 - default: '' 21 + default: '', 22 22 }, 23 23 localeStatus: { 24 24 type: String, 25 - default: '' 26 - } 25 + default: '', 26 + }, 27 27 }, 28 28 }; 29 29 </script>
+2 -2
web_src/js/components/ActivityHeatmap.vue
··· 11 11 locale: { 12 12 type: Object, 13 13 default: () => {}, 14 - } 14 + }, 15 15 }, 16 16 data: () => ({ 17 17 colorRange: [ ··· 49 49 50 50 const newSearch = params.toString(); 51 51 window.location.search = newSearch.length ? `?${newSearch}` : ''; 52 - } 52 + }, 53 53 }, 54 54 }; 55 55 </script>
+3 -3
web_src/js/components/ContextPopup.vue
··· 69 69 } 70 70 return {name: label.name, color: `#${label.color}`, textColor}; 71 71 }); 72 - } 72 + }, 73 73 }, 74 74 mounted() { 75 75 this.$refs.root.addEventListener('ce-load-context-popup', (e) => { ··· 97 97 } finally { 98 98 this.loading = false; 99 99 } 100 - } 101 - } 100 + }, 101 + }, 102 102 }; 103 103 </script> 104 104 <template>
+2 -2
web_src/js/components/DashboardRepoList.vue
··· 252 252 return { 253 253 ...webSearchRepo.repository, 254 254 latest_commit_status: webSearchRepo.latest_commit_status, 255 - locale_latest_commit_status_state: webSearchRepo.locale_latest_commit_status 255 + locale_latest_commit_status: webSearchRepo.locale_latest_commit_status, 256 256 }; 257 257 }); 258 258 const count = response.headers.get('X-Total-Count'); ··· 324 324 if (this.activeIndex === -1 || this.activeIndex > this.repos.length - 1) { 325 325 this.activeIndex = 0; 326 326 } 327 - } 327 + }, 328 328 }, 329 329 }; 330 330
+3 -3
web_src/js/components/DiffCommitSelector.vue
··· 14 14 }, 15 15 commits: [], 16 16 hoverActivated: false, 17 - lastReviewCommitSha: null 17 + lastReviewCommitSha: null, 18 18 }; 19 19 }, 20 20 computed: { ··· 29 29 }, 30 30 issueLink() { 31 31 return this.$el.parentNode.getAttribute('data-issuelink'); 32 - } 32 + }, 33 33 }, 34 34 mounted() { 35 35 document.body.addEventListener('click', this.onBodyClick); ··· 185 185 } 186 186 } 187 187 }, 188 - } 188 + }, 189 189 }; 190 190 </script> 191 191 <template>
+1 -1
web_src/js/components/DiffFileList.vue
··· 31 31 }, 32 32 loadMoreData() { 33 33 loadMoreFiles(this.store.linkLoadMore); 34 - } 34 + }, 35 35 }, 36 36 }; 37 37 </script>
+3 -3
web_src/js/components/DiffFileTree.vue
··· 30 30 let newParent = { 31 31 name: split, 32 32 children: [], 33 - isFile 33 + isFile, 34 34 }; 35 35 36 36 if (isFile === true) { ··· 40 40 if (parent) { 41 41 // check if the folder already exists 42 42 const existingFolder = parent.children.find( 43 - (x) => x.name === split 43 + (x) => x.name === split, 44 44 ); 45 45 if (existingFolder) { 46 46 newParent = existingFolder; ··· 74 74 // reduce the depth of our tree. 75 75 mergeChildIfOnlyOneDir(result); 76 76 return result; 77 - } 77 + }, 78 78 }, 79 79 mounted() { 80 80 // Default to true if unset
+1 -1
web_src/js/components/DiffFileTreeItem.vue
··· 7 7 props: { 8 8 item: { 9 9 type: Object, 10 - required: true 10 + required: true, 11 11 }, 12 12 }, 13 13 data: () => ({
+1 -1
web_src/js/components/PullRequestMergeForm.vue
··· 43 43 for (const elem of document.querySelectorAll('[data-pull-merge-style]')) { 44 44 toggleElem(elem, elem.getAttribute('data-pull-merge-style') === val); 45 45 } 46 - } 46 + }, 47 47 }, 48 48 created() { 49 49 this.mergeStyleAllowedCount = this.mergeForm.mergeStyles.reduce((v, msd) => v + (msd.allowed ? 1 : 0), 0);
+3 -3
web_src/js/components/RepoActionView.vue
··· 69 69 name: '', 70 70 link: '', 71 71 }, 72 - } 72 + }, 73 73 }, 74 74 currentJob: { 75 75 title: '', ··· 314 314 const logLine = this.$refs.steps.querySelector(selectedLogStep); 315 315 if (!logLine) return; 316 316 logLine.querySelector('.line-num').click(); 317 - } 317 + }, 318 318 }, 319 319 }; 320 320 ··· 357 357 skipped: el.getAttribute('data-locale-status-skipped'), 358 358 blocked: el.getAttribute('data-locale-status-blocked'), 359 359 }, 360 - } 360 + }, 361 361 }); 362 362 view.mount(el); 363 363 }
+1 -1
web_src/js/components/RepoActivityTopAuthors.vue
··· 47 47 this.colors.barColor = refStyle.backgroundColor; 48 48 this.colors.textColor = refStyle.color; 49 49 this.colors.textAltColor = refAltStyle.color; 50 - } 50 + }, 51 51 }; 52 52 53 53 export function initRepoActivityTopAuthorsChart() {
+3 -3
web_src/js/components/RepoBranchTagSelector.vue
··· 36 36 }, 37 37 shouldCreateTag() { 38 38 return this.mode === 'tags'; 39 - } 39 + }, 40 40 }, 41 41 42 42 watch: { ··· 45 45 this.focusSearchField(); 46 46 this.fetchBranchesOrTags(); 47 47 } 48 - } 48 + }, 49 49 }, 50 50 51 51 beforeMount() { ··· 209 209 this.isLoading = false; 210 210 } 211 211 }, 212 - } 212 + }, 213 213 }; 214 214 215 215 export function initRepoBranchTagSelector(selector) {
+3 -3
web_src/js/components/RepoCodeFrequency.vue
··· 39 39 props: { 40 40 locale: { 41 41 type: Object, 42 - required: true 42 + required: true, 43 43 }, 44 44 }, 45 45 data: () => ({ ··· 128 128 }, 129 129 ticks: { 130 130 maxRotation: 0, 131 - maxTicksLimit: 12 131 + maxTicksLimit: 12, 132 132 }, 133 133 }, 134 134 y: { 135 135 ticks: { 136 - maxTicksLimit: 6 136 + maxTicksLimit: 6, 137 137 }, 138 138 }, 139 139 },
+4 -4
web_src/js/components/RepoContributors.vue
··· 34 34 chart.resetZoom(); 35 35 opts.instance.updateOtherCharts(args.event, true); 36 36 } 37 - } 37 + }, 38 38 }; 39 39 40 40 Chart.defaults.color = chartJsColors.text; ··· 82 82 this.xAxisMax = this.xAxisEnd; 83 83 this.type = val; 84 84 this.sortContributors(); 85 - } 85 + }, 86 86 }); 87 87 }, 88 88 methods: { ··· 175 175 // Normally, chartjs handles this automatically, but it will resize the graph when you 176 176 // zoom, pan etc. I think resizing the graph makes it harder to compare things visually. 177 177 const maxValue = Math.max( 178 - ...this.totalStats.weeks.map((o) => o[this.type]) 178 + ...this.totalStats.weeks.map((o) => o[this.type]), 179 179 ); 180 180 const [coefficient, exp] = maxValue.toExponential().split('e').map(Number); 181 181 if (coefficient % 1 === 0) return maxValue; ··· 187 187 // for contributors' graph. If I let chartjs do this for me, it will choose different 188 188 // maxY value for each contributors' graph which again makes it harder to compare. 189 189 const maxValue = Math.max( 190 - ...this.sortedContributors.map((c) => c.max_contribution_type) 190 + ...this.sortedContributors.map((c) => c.max_contribution_type), 191 191 ); 192 192 const [coefficient, exp] = maxValue.toExponential().split('e').map(Number); 193 193 if (coefficient % 1 === 0) return maxValue;
+3 -3
web_src/js/components/RepoRecentCommits.vue
··· 35 35 props: { 36 36 locale: { 37 37 type: Object, 38 - required: true 38 + required: true, 39 39 }, 40 40 }, 41 41 data: () => ({ ··· 105 105 }, 106 106 ticks: { 107 107 maxRotation: 0, 108 - maxTicksLimit: 52 108 + maxTicksLimit: 52, 109 109 }, 110 110 }, 111 111 y: { 112 112 ticks: { 113 - maxTicksLimit: 6 113 + maxTicksLimit: 6, 114 114 }, 115 115 }, 116 116 },
+2 -2
web_src/js/components/ScopedAccessTokenSelector.vue
··· 39 39 'repository', 40 40 'user'); 41 41 return categories; 42 - } 42 + }, 43 43 }, 44 44 45 45 mounted() { ··· 68 68 } 69 69 // no scopes selected, show validation error 70 70 showElem(warningEl); 71 - } 71 + }, 72 72 }, 73 73 }; 74 74
+2 -2
web_src/js/features/captcha.js
··· 9 9 10 10 const params = { 11 11 sitekey: siteKey, 12 - theme: isDark ? 'dark' : 'light' 12 + theme: isDark ? 'dark' : 'light', 13 13 }; 14 14 15 15 switch (captchaEl.getAttribute('data-captcha-type')) { ··· 42 42 siteKey: { 43 43 instanceUrl: new URL(instanceURL), 44 44 key: siteKey, 45 - } 45 + }, 46 46 }); 47 47 break; 48 48 }
+1 -1
web_src/js/features/code-frequency.js
··· 11 11 loadingTitle: el.getAttribute('data-locale-loading-title'), 12 12 loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'), 13 13 loadingInfo: el.getAttribute('data-locale-loading-info'), 14 - } 14 + }, 15 15 }); 16 16 View.mount(el); 17 17 } catch (err) {
+2 -2
web_src/js/features/codeeditor.js
··· 80 80 rules: [ 81 81 { 82 82 background: getColor('--color-code-bg'), 83 - } 83 + }, 84 84 ], 85 85 colors: { 86 86 'editor.background': getColor('--color-code-bg'), ··· 98 98 'input.foreground': getColor('--color-input-text'), 99 99 'scrollbar.shadow': getColor('--color-shadow'), 100 100 'progressBar.background': getColor('--color-primary'), 101 - } 101 + }, 102 102 }); 103 103 104 104 // Quick fix: https://github.com/microsoft/monaco-editor/issues/2962
+1 -1
web_src/js/features/common-global.js
··· 335 335 const data = await response.json(); 336 336 window.location.href = data.redirect; 337 337 } 338 - } 338 + }, 339 339 }).modal('show'); 340 340 } 341 341
+1 -1
web_src/js/features/comp/EasyMDEToolbarActions.js
··· 139 139 }, 140 140 icon: svg('octicon-chevron-right'), 141 141 title: 'Add Inline Code', 142 - } 142 + }, 143 143 }; 144 144 145 145 for (const [key, value] of Object.entries(actions)) {
+4 -4
web_src/js/features/comp/SearchUserBox.js
··· 22 22 $.each(response.data, (_i, item) => { 23 23 const resultItem = { 24 24 title: item.login, 25 - image: item.avatar_url 25 + image: item.avatar_url, 26 26 }; 27 27 if (item.full_name) { 28 28 resultItem.description = htmlEscape(item.full_name); ··· 37 37 if (allowEmailInput && items.length === 0 && looksLikeEmailAddressCheck.test(searchQuery)) { 38 38 const resultItem = { 39 39 title: searchQuery, 40 - description: allowEmailDescription 40 + description: allowEmailDescription, 41 41 }; 42 42 items.push(resultItem); 43 43 } 44 44 45 45 return {results: items}; 46 - } 46 + }, 47 47 }, 48 48 searchFields: ['login', 'full_name'], 49 - showNoResults: false 49 + showNoResults: false, 50 50 }); 51 51 }
+1 -1
web_src/js/features/contextpopup.js
··· 37 37 interactiveBorder: 5, 38 38 onShow: () => { 39 39 el.firstChild.dispatchEvent(new CustomEvent('ce-load-context-popup', {detail: {owner, repo, index}})); 40 - } 40 + }, 41 41 }); 42 42 } 43 43 }
+1 -1
web_src/js/features/contributors.js
··· 18 18 loadingTitle: el.getAttribute('data-locale-loading-title'), 19 19 loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'), 20 20 loadingInfo: el.getAttribute('data-locale-loading-info'), 21 - } 21 + }, 22 22 }); 23 23 View.mount(el); 24 24 } catch (err) {
+1 -1
web_src/js/features/eventsource.sharedworker.js
··· 48 48 this.eventSource.addEventListener(eventType, (event) => { 49 49 this.notifyClients({ 50 50 type: eventType, 51 - data: event.data 51 + data: event.data, 52 52 }); 53 53 }); 54 54 }
+15 -15
web_src/js/features/imagediff.js
··· 20 20 if (img.width > 1 && img.width < MaxSize && img.height > 1 && img.height < MaxSize) { 21 21 return { 22 22 width: img.width, 23 - height: img.height 23 + height: img.height, 24 24 }; 25 25 } 26 26 if (svg.hasAttribute('viewBox')) { 27 27 const viewBox = svg.viewBox.baseVal; 28 28 return { 29 29 width: DefaultSize, 30 - height: DefaultSize * viewBox.width / viewBox.height 30 + height: DefaultSize * viewBox.width / viewBox.height, 31 31 }; 32 32 } 33 33 return { 34 34 width: DefaultSize, 35 - height: DefaultSize 35 + height: DefaultSize, 36 36 }; 37 37 } 38 38 return null; ··· 42 42 function createContext(image1, image2) { 43 43 const size1 = { 44 44 width: image1 && image1.width || 0, 45 - height: image1 && image1.height || 0 45 + height: image1 && image1.height || 0, 46 46 }; 47 47 const size2 = { 48 48 width: image2 && image2.width || 0, 49 - height: image2 && image2.height || 0 49 + height: image2 && image2.height || 0, 50 50 }; 51 51 const max = { 52 52 width: Math.max(size2.width, size1.width), 53 - height: Math.max(size2.height, size1.height) 53 + height: Math.max(size2.height, size1.height), 54 54 }; 55 55 56 56 return { ··· 63 63 Math.floor(max.width - size1.width) / 2, 64 64 Math.floor(max.height - size1.height) / 2, 65 65 Math.floor(max.width - size2.width) / 2, 66 - Math.floor(max.height - size2.height) / 2 67 - ] 66 + Math.floor(max.height - size2.height) / 2, 67 + ], 68 68 }; 69 69 } 70 70 ··· 79 79 path: this.getAttribute('data-path-after'), 80 80 mime: this.getAttribute('data-mime-after'), 81 81 $images: $container.find('img.image-after'), // matches 3 <img> 82 - $boundsInfo: $container.find('.bounds-info-after') 82 + $boundsInfo: $container.find('.bounds-info-after'), 83 83 }, { 84 84 path: this.getAttribute('data-path-before'), 85 85 mime: this.getAttribute('data-mime-before'), 86 86 $images: $container.find('img.image-before'), // matches 3 <img> 87 - $boundsInfo: $container.find('.bounds-info-before') 87 + $boundsInfo: $container.find('.bounds-info-before'), 88 88 }]; 89 89 90 90 await Promise.all(imageInfos.map(async (info) => { ··· 222 222 223 223 sizes.image1.css({ 224 224 width: sizes.size1.width * factor, 225 - height: sizes.size1.height * factor 225 + height: sizes.size1.height * factor, 226 226 }); 227 227 sizes.image2.css({ 228 228 width: sizes.size2.width * factor, 229 - height: sizes.size2.height * factor 229 + height: sizes.size2.height * factor, 230 230 }); 231 231 sizes.image1.parent().css({ 232 232 margin: `${sizes.ratio[1] * factor}px ${sizes.ratio[0] * factor}px`, 233 233 width: sizes.size1.width * factor + 2, 234 - height: sizes.size1.height * factor + 2 234 + height: sizes.size1.height * factor + 2, 235 235 }); 236 236 sizes.image2.parent().css({ 237 237 margin: `${sizes.ratio[3] * factor}px ${sizes.ratio[2] * factor}px`, 238 238 width: sizes.size2.width * factor + 2, 239 - height: sizes.size2.height * factor + 2 239 + height: sizes.size2.height * factor + 2, 240 240 }); 241 241 242 242 // some inner elements are `position: absolute`, so the container's height must be large enough ··· 248 248 249 249 const $range = $container.find("input[type='range']"); 250 250 const onInput = () => sizes.image1.parent().css({ 251 - opacity: $range.val() / 100 251 + opacity: $range.val() / 100, 252 252 }); 253 253 $range.on('input', onInput); 254 254 onInput();
+1 -1
web_src/js/features/install.js
··· 19 19 const defaultDbHosts = { 20 20 mysql: '127.0.0.1:3306', 21 21 postgres: '127.0.0.1:5432', 22 - mssql: '127.0.0.1:1433' 22 + mssql: '127.0.0.1:1433', 23 23 }; 24 24 25 25 const dbHost = document.getElementById('db_host');
+3 -3
web_src/js/features/org-team.js
··· 26 26 $.each(response.data, (_i, item) => { 27 27 items.push({ 28 28 title: item.repository.full_name.split('/')[1], 29 - description: item.repository.full_name 29 + description: item.repository.full_name, 30 30 }); 31 31 }); 32 32 33 33 return {results: items}; 34 - } 34 + }, 35 35 }, 36 36 searchFields: ['full_name'], 37 - showNoResults: false 37 + showNoResults: false, 38 38 }); 39 39 }
+1 -1
web_src/js/features/recent-commits.js
··· 11 11 loadingTitle: el.getAttribute('data-locale-loading-title'), 12 12 loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'), 13 13 loadingInfo: el.getAttribute('data-locale-loading-info'), 14 - } 14 + }, 15 15 }); 16 16 View.mount(el); 17 17 } catch (err) {
+1 -1
web_src/js/features/repo-code.js
··· 116 116 tippy.popper.addEventListener('click', () => { 117 117 tippy.hide(); 118 118 }, {once: true}); 119 - } 119 + }, 120 120 }); 121 121 } 122 122
+6 -6
web_src/js/features/repo-home.js
··· 146 146 addedValue = addedValue.toLowerCase().trim(); 147 147 $($addedChoice).attr('data-value', addedValue); 148 148 $($addedChoice).attr('data-text', addedValue); 149 - } 149 + }, 150 150 }); 151 151 152 152 $.fn.form.settings.rules.validateTopic = function (_values, regExp) { ··· 168 168 { 169 169 type: 'validateTopic', 170 170 value: /^\s*[a-z0-9][-.a-z0-9]{0,35}\s*$/, 171 - prompt: topicPrompts.formatPrompt 171 + prompt: topicPrompts.formatPrompt, 172 172 }, 173 173 { 174 174 type: 'maxCount[25]', 175 - prompt: topicPrompts.countPrompt 176 - } 177 - ] 175 + prompt: topicPrompts.countPrompt, 176 + }, 177 + ], 178 178 }, 179 - } 179 + }, 180 180 }); 181 181 }
+1 -1
web_src/js/features/repo-issue-content.js
··· 60 60 }, 61 61 onHide() { 62 62 $(this).dropdown('clear', true); 63 - } 63 + }, 64 64 }); 65 65 $dialog.modal({ 66 66 async onShow() {
+7 -7
web_src/js/features/repo-issue.js
··· 59 59 60 60 try { 61 61 const response = await POST($('#update-issue-deadline-form').attr('action'), { 62 - data: {due_date: realDeadline} 62 + data: {due_date: realDeadline}, 63 63 }); 64 64 65 65 if (response.ok) { ··· 268 268 $pullUpdateButton.find('.button-text').text($choice.text()); 269 269 $pullUpdateButton.data('do', $url); 270 270 } 271 - } 271 + }, 272 272 }); 273 273 } 274 274 ··· 316 316 $.each(response.data, (_r, repo) => { 317 317 filteredResponse.results.push({ 318 318 name: htmlEscape(repo.repository.full_name), 319 - value: repo.repository.full_name 319 + value: repo.repository.full_name, 320 320 }); 321 321 }); 322 322 return filteredResponse; ··· 327 327 const $form = $choice.closest('form'); 328 328 $form.attr('action', `${appSubUrl}/${_text}/issues/new`); 329 329 }, 330 - fullTextSearch: true 330 + fullTextSearch: true, 331 331 }); 332 332 } 333 333 ··· 443 443 } 444 444 window.scrollTo({ 445 445 top: $commentDiv.offset().top - offset, 446 - behavior: 'instant' 446 + behavior: 'instant', 447 447 }); 448 448 } 449 449 } ··· 661 661 // Replace branch name to keep translation from HTML template 662 662 $selectionTextField.html($selectionTextField.html().replace( 663 663 `${baseName}:${branchNameOld}`, 664 - `${baseName}:${branchNameNew}` 664 + `${baseName}:${branchNameNew}`, 665 665 )); 666 666 $selectionTextField.data('branch', branchNameNew); // update branch name in setting 667 667 }; ··· 695 695 const editor = await initComboMarkdownEditor($markdownEditor, { 696 696 onContentChanged: (editor) => { 697 697 $formField.val(editor.value()); 698 - } 698 + }, 699 699 }); 700 700 701 701 $formField.on('focus', async () => {
+4 -4
web_src/js/features/repo-settings.js
··· 39 39 $text.text('(none)'); // prevent from misleading users when the access mode is undefined 40 40 } 41 41 }, 0); 42 - } 42 + }, 43 43 }); 44 44 }); 45 45 } ··· 56 56 $.each(response.data, (_i, item) => { 57 57 items.push({ 58 58 title: item.name, 59 - description: `${item.permission} access` // TODO: translate this string 59 + description: `${item.permission} access`, // TODO: translate this string 60 60 }); 61 61 }); 62 62 63 63 return {results: items}; 64 - } 64 + }, 65 65 }, 66 66 searchFields: ['name', 'description'], 67 - showNoResults: false 67 + showNoResults: false, 68 68 }); 69 69 } 70 70
+3 -3
web_src/js/features/repo-template.js
··· 29 29 const filteredResponse = {success: true, results: []}; 30 30 filteredResponse.results.push({ 31 31 name: '', 32 - value: '' 32 + value: '', 33 33 }); 34 34 // Parse the response from the api to work with our dropdown 35 35 $.each(response.data, (_r, repo) => { 36 36 filteredResponse.results.push({ 37 37 name: htmlEscape(repo.repository.full_name), 38 - value: repo.repository.id 38 + value: repo.repository.id, 39 39 }); 40 40 }); 41 41 return filteredResponse; ··· 43 43 cache: false, 44 44 }, 45 45 46 - fullTextSearch: true 46 + fullTextSearch: true, 47 47 }); 48 48 }; 49 49 $('#uid').on('change', changeOwner);
+1 -1
web_src/js/features/repo-wiki.js
··· 60 60 'gitea-code-inline', 'code', 'quote', '|', 'gitea-checkbox-empty', 'gitea-checkbox-checked', '|', 61 61 'unordered-list', 'ordered-list', '|', 62 62 'link', 'image', 'table', 'horizontal-rule', '|', 63 - 'preview', 'fullscreen', 'side-by-side', '|', 'gitea-switch-to-textarea' 63 + 'preview', 'fullscreen', 'side-by-side', '|', 'gitea-switch-to-textarea', 64 64 ], 65 65 }, 66 66 });
+2 -2
web_src/js/features/tribute.js
··· 25 25 }, 26 26 menuItemTemplate: (item) => { 27 27 return `<div class="tribute-item">${emojiHTML(item.original)}<span>${htmlEscape(item.original)}</span></div>`; 28 - } 28 + }, 29 29 }); 30 30 } 31 31 ··· 41 41 ${item.original.fullname && item.original.fullname !== '' ? `<span class="fullname">${htmlEscape(item.original.fullname)}</span>` : ''} 42 42 </div> 43 43 `; 44 - } 44 + }, 45 45 }); 46 46 } 47 47
+3 -3
web_src/js/features/user-auth-webauthn.js
··· 26 26 } 27 27 try { 28 28 const credential = await navigator.credentials.get({ 29 - publicKey: options.publicKey 29 + publicKey: options.publicKey, 30 30 }); 31 31 await verifyAssertion(credential); 32 32 } catch (err) { ··· 37 37 delete options.publicKey.extensions.appid; 38 38 try { 39 39 const credential = await navigator.credentials.get({ 40 - publicKey: options.publicKey 40 + publicKey: options.publicKey, 41 41 }); 42 42 await verifyAssertion(credential); 43 43 } catch (err) { ··· 185 185 186 186 try { 187 187 const credential = await navigator.credentials.create({ 188 - publicKey: options.publicKey 188 + publicKey: options.publicKey, 189 189 }); 190 190 await webauthnRegistered(credential); 191 191 } catch (err) {
+1 -1
web_src/js/modules/tippy.js
··· 148 148 const observerConnect = (observer) => observer.observe(document, { 149 149 subtree: true, 150 150 childList: true, 151 - attributeFilter: ['data-tooltip-content', 'title'] 151 + attributeFilter: ['data-tooltip-content', 'title'], 152 152 }); 153 153 const observer = new MutationObserver((mutationList, observer) => { 154 154 const pending = observer.takeRecords();
+3 -3
web_src/js/standalone/swagger.js
··· 21 21 docExpansion: 'none', 22 22 defaultModelRendering: 'model', // don't show examples by default, because they may be incomplete 23 23 presets: [ 24 - SwaggerUI.presets.apis 24 + SwaggerUI.presets.apis, 25 25 ], 26 26 plugins: [ 27 - SwaggerUI.plugins.DownloadUrl 28 - ] 27 + SwaggerUI.plugins.DownloadUrl, 28 + ], 29 29 }); 30 30 31 31 window.ui = ui;
+1 -1
web_src/js/svg.js
··· 189 189 name: {type: String, required: true}, 190 190 size: {type: Number, default: 16}, 191 191 className: {type: String, default: ''}, 192 - symbolId: {type: String} 192 + symbolId: {type: String}, 193 193 }, 194 194 render() { 195 195 let {svgOuter, svgInnerHtml} = svgParseOuterInner(this.name);
+1 -1
web_src/js/utils/dom.js
··· 191 191 textarea.removeEventListener('mousemove', onUserResize); 192 192 textarea.removeEventListener('input', resizeToFit); 193 193 textarea.form?.removeEventListener('reset', onFormReset); 194 - } 194 + }, 195 195 }; 196 196 } 197 197
+1 -1
web_src/js/webcomponents/polyfills.js
··· 9 9 return { 10 10 format(value) { 11 11 return ` ${value} ${options.unit}`; 12 - } 12 + }, 13 13 }; 14 14 } 15 15 return intlNumberFormat(locales, options);
+3 -3
webpack.config.js
··· 182 182 ], 183 183 }, 184 184 }, 185 - } 185 + }, 186 186 ], 187 187 }, 188 188 { ··· 195 195 type: 'asset/resource', 196 196 generator: { 197 197 filename: 'fonts/[name].[contenthash:8][ext]', 198 - } 198 + }, 199 199 }, 200 200 { 201 201 test: /\.png$/i, 202 202 type: 'asset/resource', 203 203 generator: { 204 204 filename: 'img/webpack/[name].[contenthash:8][ext]', 205 - } 205 + }, 206 206 }, 207 207 ], 208 208 },