aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.eslintrc.yaml2
-rw-r--r--playwright.config.js2
-rwxr-xr-xtools/generate-images.js2
-rwxr-xr-xtools/generate-svg.js4
-rw-r--r--web_src/js/components/ActionRunStatus.vue10
-rw-r--r--web_src/js/components/ActivityHeatmap.vue4
-rw-r--r--web_src/js/components/ContextPopup.vue6
-rw-r--r--web_src/js/components/DashboardRepoList.vue4
-rw-r--r--web_src/js/components/DiffCommitSelector.vue6
-rw-r--r--web_src/js/components/DiffFileList.vue2
-rw-r--r--web_src/js/components/DiffFileTree.vue6
-rw-r--r--web_src/js/components/DiffFileTreeItem.vue2
-rw-r--r--web_src/js/components/PullRequestMergeForm.vue2
-rw-r--r--web_src/js/components/RepoActionView.vue6
-rw-r--r--web_src/js/components/RepoActivityTopAuthors.vue2
-rw-r--r--web_src/js/components/RepoBranchTagSelector.vue6
-rw-r--r--web_src/js/components/RepoCodeFrequency.vue6
-rw-r--r--web_src/js/components/RepoContributors.vue8
-rw-r--r--web_src/js/components/RepoRecentCommits.vue6
-rw-r--r--web_src/js/components/ScopedAccessTokenSelector.vue4
-rw-r--r--web_src/js/features/captcha.js4
-rw-r--r--web_src/js/features/code-frequency.js2
-rw-r--r--web_src/js/features/codeeditor.js4
-rw-r--r--web_src/js/features/common-global.js2
-rw-r--r--web_src/js/features/comp/EasyMDEToolbarActions.js2
-rw-r--r--web_src/js/features/comp/SearchUserBox.js8
-rw-r--r--web_src/js/features/contextpopup.js2
-rw-r--r--web_src/js/features/contributors.js2
-rw-r--r--web_src/js/features/eventsource.sharedworker.js2
-rw-r--r--web_src/js/features/imagediff.js30
-rw-r--r--web_src/js/features/install.js2
-rw-r--r--web_src/js/features/org-team.js6
-rw-r--r--web_src/js/features/recent-commits.js2
-rw-r--r--web_src/js/features/repo-code.js2
-rw-r--r--web_src/js/features/repo-home.js12
-rw-r--r--web_src/js/features/repo-issue-content.js2
-rw-r--r--web_src/js/features/repo-issue.js14
-rw-r--r--web_src/js/features/repo-settings.js8
-rw-r--r--web_src/js/features/repo-template.js6
-rw-r--r--web_src/js/features/repo-wiki.js2
-rw-r--r--web_src/js/features/tribute.js4
-rw-r--r--web_src/js/features/user-auth-webauthn.js6
-rw-r--r--web_src/js/modules/tippy.js2
-rw-r--r--web_src/js/standalone/swagger.js6
-rw-r--r--web_src/js/svg.js2
-rw-r--r--web_src/js/utils/dom.js2
-rw-r--r--web_src/js/webcomponents/polyfills.js2
-rw-r--r--webpack.config.js6
48 files changed, 117 insertions, 117 deletions
diff --git a/.eslintrc.yaml b/.eslintrc.yaml
index 72039a6013..eeb3e20cb8 100644
--- a/.eslintrc.yaml
+++ b/.eslintrc.yaml
@@ -119,7 +119,7 @@ rules:
"@stylistic/js/arrow-spacing": [2, {before: true, after: true}]
"@stylistic/js/block-spacing": [0]
"@stylistic/js/brace-style": [2, 1tbs, {allowSingleLine: true}]
- "@stylistic/js/comma-dangle": [2, only-multiline]
+ "@stylistic/js/comma-dangle": [2, always-multiline]
"@stylistic/js/comma-spacing": [2, {before: false, after: true}]
"@stylistic/js/comma-style": [2, last]
"@stylistic/js/computed-property-spacing": [2, never]
diff --git a/playwright.config.js b/playwright.config.js
index b7badf1cc0..bdd303ae25 100644
--- a/playwright.config.js
+++ b/playwright.config.js
@@ -20,7 +20,7 @@ export default {
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
- timeout: 2000
+ timeout: 2000,
},
/* Fail the build on CI if you accidentally left test.only in the source code. */
diff --git a/tools/generate-images.js b/tools/generate-images.js
index cc2855c18e..0bd3af29e4 100755
--- a/tools/generate-images.js
+++ b/tools/generate-images.js
@@ -20,7 +20,7 @@ async function generate(svg, path, {size, bg}) {
'removeDimensions',
{
name: 'addAttributesToSVGElement',
- params: {attributes: [{width: size}, {height: size}]}
+ params: {attributes: [{width: size}, {height: size}]},
},
],
});
diff --git a/tools/generate-svg.js b/tools/generate-svg.js
index f26b60d960..f744162099 100755
--- a/tools/generate-svg.js
+++ b/tools/generate-svg.js
@@ -39,8 +39,8 @@ async function processFile(file, {prefix, fullName} = {}) {
attributes: [
{'xmlns': 'http://www.w3.org/2000/svg'},
{'width': '16'}, {'height': '16'}, {'aria-hidden': 'true'},
- ]
- }
+ ],
+ },
},
],
});
diff --git a/web_src/js/components/ActionRunStatus.vue b/web_src/js/components/ActionRunStatus.vue
index 08a47eded7..4eccddffdf 100644
--- a/web_src/js/components/ActionRunStatus.vue
+++ b/web_src/js/components/ActionRunStatus.vue
@@ -10,20 +10,20 @@ export default {
props: {
status: {
type: String,
- required: true
+ required: true,
},
size: {
type: Number,
- default: 16
+ default: 16,
},
className: {
type: String,
- default: ''
+ default: '',
},
localeStatus: {
type: String,
- default: ''
- }
+ default: '',
+ },
},
};
</script>
diff --git a/web_src/js/components/ActivityHeatmap.vue b/web_src/js/components/ActivityHeatmap.vue
index 96a6e68012..9592a0df3c 100644
--- a/web_src/js/components/ActivityHeatmap.vue
+++ b/web_src/js/components/ActivityHeatmap.vue
@@ -11,7 +11,7 @@ export default {
locale: {
type: Object,
default: () => {},
- }
+ },
},
data: () => ({
colorRange: [
@@ -49,7 +49,7 @@ export default {
const newSearch = params.toString();
window.location.search = newSearch.length ? `?${newSearch}` : '';
- }
+ },
},
};
</script>
diff --git a/web_src/js/components/ContextPopup.vue b/web_src/js/components/ContextPopup.vue
index 3a1b828cca..149cabd41e 100644
--- a/web_src/js/components/ContextPopup.vue
+++ b/web_src/js/components/ContextPopup.vue
@@ -69,7 +69,7 @@ export default {
}
return {name: label.name, color: `#${label.color}`, textColor};
});
- }
+ },
},
mounted() {
this.$refs.root.addEventListener('ce-load-context-popup', (e) => {
@@ -97,8 +97,8 @@ export default {
} finally {
this.loading = false;
}
- }
- }
+ },
+ },
};
</script>
<template>
diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue
index df46516449..f4edce955a 100644
--- a/web_src/js/components/DashboardRepoList.vue
+++ b/web_src/js/components/DashboardRepoList.vue
@@ -253,7 +253,7 @@ const sfc = {
...webSearchRepo.repository,
latest_commit_status_state: webSearchRepo.latest_commit_status.State,
locale_latest_commit_status_state: webSearchRepo.locale_latest_commit_status,
- latest_commit_status_state_link: webSearchRepo.latest_commit_status.TargetURL
+ latest_commit_status_state_link: webSearchRepo.latest_commit_status.TargetURL,
};
});
const count = response.headers.get('X-Total-Count');
@@ -325,7 +325,7 @@ const sfc = {
if (this.activeIndex === -1 || this.activeIndex > this.repos.length - 1) {
this.activeIndex = 0;
}
- }
+ },
},
};
diff --git a/web_src/js/components/DiffCommitSelector.vue b/web_src/js/components/DiffCommitSelector.vue
index e8ceffa3e8..df712a2cb4 100644
--- a/web_src/js/components/DiffCommitSelector.vue
+++ b/web_src/js/components/DiffCommitSelector.vue
@@ -14,7 +14,7 @@ export default {
},
commits: [],
hoverActivated: false,
- lastReviewCommitSha: null
+ lastReviewCommitSha: null,
};
},
computed: {
@@ -29,7 +29,7 @@ export default {
},
issueLink() {
return this.$el.parentNode.getAttribute('data-issuelink');
- }
+ },
},
mounted() {
document.body.addEventListener('click', this.onBodyClick);
@@ -185,7 +185,7 @@ export default {
}
}
},
- }
+ },
};
</script>
<template>
diff --git a/web_src/js/components/DiffFileList.vue b/web_src/js/components/DiffFileList.vue
index 2499d998a8..64493b348a 100644
--- a/web_src/js/components/DiffFileList.vue
+++ b/web_src/js/components/DiffFileList.vue
@@ -31,7 +31,7 @@ export default {
},
loadMoreData() {
loadMoreFiles(this.store.linkLoadMore);
- }
+ },
},
};
</script>
diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue
index 3686629df8..83d57b00d1 100644
--- a/web_src/js/components/DiffFileTree.vue
+++ b/web_src/js/components/DiffFileTree.vue
@@ -30,7 +30,7 @@ export default {
let newParent = {
name: split,
children: [],
- isFile
+ isFile,
};
if (isFile === true) {
@@ -40,7 +40,7 @@ export default {
if (parent) {
// check if the folder already exists
const existingFolder = parent.children.find(
- (x) => x.name === split
+ (x) => x.name === split,
);
if (existingFolder) {
newParent = existingFolder;
@@ -74,7 +74,7 @@ export default {
// reduce the depth of our tree.
mergeChildIfOnlyOneDir(result);
return result;
- }
+ },
},
mounted() {
// Default to true if unset
diff --git a/web_src/js/components/DiffFileTreeItem.vue b/web_src/js/components/DiffFileTreeItem.vue
index a5d78f07f1..0f6e54363f 100644
--- a/web_src/js/components/DiffFileTreeItem.vue
+++ b/web_src/js/components/DiffFileTreeItem.vue
@@ -7,7 +7,7 @@ export default {
props: {
item: {
type: Object,
- required: true
+ required: true,
},
},
data: () => ({
diff --git a/web_src/js/components/PullRequestMergeForm.vue b/web_src/js/components/PullRequestMergeForm.vue
index 5f2e19f2e5..35acbdf74f 100644
--- a/web_src/js/components/PullRequestMergeForm.vue
+++ b/web_src/js/components/PullRequestMergeForm.vue
@@ -43,7 +43,7 @@ export default {
for (const elem of document.querySelectorAll('[data-pull-merge-style]')) {
toggleElem(elem, elem.getAttribute('data-pull-merge-style') === val);
}
- }
+ },
},
created() {
this.mergeStyleAllowedCount = this.mergeForm.mergeStyles.reduce((v, msd) => v + (msd.allowed ? 1 : 0), 0);
diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue
index c1e2c2b2d5..2a4a6d77ff 100644
--- a/web_src/js/components/RepoActionView.vue
+++ b/web_src/js/components/RepoActionView.vue
@@ -66,7 +66,7 @@ const sfc = {
name: '',
link: '',
},
- }
+ },
},
currentJob: {
title: '',
@@ -311,7 +311,7 @@ const sfc = {
const logLine = this.$refs.steps.querySelector(selectedLogStep);
if (!logLine) return;
logLine.querySelector('.line-num').click();
- }
+ },
},
};
@@ -352,7 +352,7 @@ export function initRepositoryActionView() {
skipped: el.getAttribute('data-locale-status-skipped'),
blocked: el.getAttribute('data-locale-status-blocked'),
},
- }
+ },
});
view.mount(el);
}
diff --git a/web_src/js/components/RepoActivityTopAuthors.vue b/web_src/js/components/RepoActivityTopAuthors.vue
index fe41218d88..a41fb61d78 100644
--- a/web_src/js/components/RepoActivityTopAuthors.vue
+++ b/web_src/js/components/RepoActivityTopAuthors.vue
@@ -47,7 +47,7 @@ const sfc = {
this.colors.barColor = refStyle.backgroundColor;
this.colors.textColor = refStyle.color;
this.colors.textAltColor = refAltStyle.color;
- }
+ },
};
export function initRepoActivityTopAuthorsChart() {
diff --git a/web_src/js/components/RepoBranchTagSelector.vue b/web_src/js/components/RepoBranchTagSelector.vue
index a5ac689e5a..e3e0c13fb9 100644
--- a/web_src/js/components/RepoBranchTagSelector.vue
+++ b/web_src/js/components/RepoBranchTagSelector.vue
@@ -36,7 +36,7 @@ const sfc = {
},
shouldCreateTag() {
return this.mode === 'tags';
- }
+ },
},
watch: {
@@ -45,7 +45,7 @@ const sfc = {
this.focusSearchField();
this.fetchBranchesOrTags();
}
- }
+ },
},
beforeMount() {
@@ -209,7 +209,7 @@ const sfc = {
this.isLoading = false;
}
},
- }
+ },
};
export function initRepoBranchTagSelector(selector) {
diff --git a/web_src/js/components/RepoCodeFrequency.vue b/web_src/js/components/RepoCodeFrequency.vue
index 305732afc1..4e11d51a4a 100644
--- a/web_src/js/components/RepoCodeFrequency.vue
+++ b/web_src/js/components/RepoCodeFrequency.vue
@@ -39,7 +39,7 @@ export default {
props: {
locale: {
type: Object,
- required: true
+ required: true,
},
},
data: () => ({
@@ -128,12 +128,12 @@ export default {
},
ticks: {
maxRotation: 0,
- maxTicksLimit: 12
+ maxTicksLimit: 12,
},
},
y: {
ticks: {
- maxTicksLimit: 6
+ maxTicksLimit: 6,
},
},
},
diff --git a/web_src/js/components/RepoContributors.vue b/web_src/js/components/RepoContributors.vue
index ca51ca8aba..731b21bea3 100644
--- a/web_src/js/components/RepoContributors.vue
+++ b/web_src/js/components/RepoContributors.vue
@@ -34,7 +34,7 @@ const customEventListener = {
chart.resetZoom();
opts.instance.updateOtherCharts(args.event, true);
}
- }
+ },
};
Chart.defaults.color = chartJsColors.text;
@@ -82,7 +82,7 @@ export default {
this.xAxisMax = this.xAxisEnd;
this.type = val;
this.sortContributors();
- }
+ },
});
},
methods: {
@@ -175,7 +175,7 @@ export default {
// Normally, chartjs handles this automatically, but it will resize the graph when you
// zoom, pan etc. I think resizing the graph makes it harder to compare things visually.
const maxValue = Math.max(
- ...this.totalStats.weeks.map((o) => o[this.type])
+ ...this.totalStats.weeks.map((o) => o[this.type]),
);
const [coefficient, exp] = maxValue.toExponential().split('e').map(Number);
if (coefficient % 1 === 0) return maxValue;
@@ -187,7 +187,7 @@ export default {
// for contributors' graph. If I let chartjs do this for me, it will choose different
// maxY value for each contributors' graph which again makes it harder to compare.
const maxValue = Math.max(
- ...this.sortedContributors.map((c) => c.max_contribution_type)
+ ...this.sortedContributors.map((c) => c.max_contribution_type),
);
const [coefficient, exp] = maxValue.toExponential().split('e').map(Number);
if (coefficient % 1 === 0) return maxValue;
diff --git a/web_src/js/components/RepoRecentCommits.vue b/web_src/js/components/RepoRecentCommits.vue
index 23738b8060..1818d57943 100644
--- a/web_src/js/components/RepoRecentCommits.vue
+++ b/web_src/js/components/RepoRecentCommits.vue
@@ -35,7 +35,7 @@ export default {
props: {
locale: {
type: Object,
- required: true
+ required: true,
},
},
data: () => ({
@@ -105,12 +105,12 @@ export default {
},
ticks: {
maxRotation: 0,
- maxTicksLimit: 52
+ maxTicksLimit: 52,
},
},
y: {
ticks: {
- maxTicksLimit: 6
+ maxTicksLimit: 6,
},
},
},
diff --git a/web_src/js/components/ScopedAccessTokenSelector.vue b/web_src/js/components/ScopedAccessTokenSelector.vue
index f6af7e447f..ae4e8299f2 100644
--- a/web_src/js/components/ScopedAccessTokenSelector.vue
+++ b/web_src/js/components/ScopedAccessTokenSelector.vue
@@ -39,7 +39,7 @@ const sfc = {
'repository',
'user');
return categories;
- }
+ },
},
mounted() {
@@ -68,7 +68,7 @@ const sfc = {
}
// no scopes selected, show validation error
showElem(warningEl);
- }
+ },
},
};
diff --git a/web_src/js/features/captcha.js b/web_src/js/features/captcha.js
index 3da5dbda41..c803a5006b 100644
--- a/web_src/js/features/captcha.js
+++ b/web_src/js/features/captcha.js
@@ -9,7 +9,7 @@ export async function initCaptcha() {
const params = {
sitekey: siteKey,
- theme: isDark ? 'dark' : 'light'
+ theme: isDark ? 'dark' : 'light',
};
switch (captchaEl.getAttribute('data-captcha-type')) {
@@ -42,7 +42,7 @@ export async function initCaptcha() {
siteKey: {
instanceUrl: new URL(instanceURL),
key: siteKey,
- }
+ },
});
break;
}
diff --git a/web_src/js/features/code-frequency.js b/web_src/js/features/code-frequency.js
index 103d82f6e3..47e1539ddc 100644
--- a/web_src/js/features/code-frequency.js
+++ b/web_src/js/features/code-frequency.js
@@ -11,7 +11,7 @@ export async function initRepoCodeFrequency() {
loadingTitle: el.getAttribute('data-locale-loading-title'),
loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'),
loadingInfo: el.getAttribute('data-locale-loading-info'),
- }
+ },
});
View.mount(el);
} catch (err) {
diff --git a/web_src/js/features/codeeditor.js b/web_src/js/features/codeeditor.js
index fceb2f7620..4fb8bb9e63 100644
--- a/web_src/js/features/codeeditor.js
+++ b/web_src/js/features/codeeditor.js
@@ -80,7 +80,7 @@ export async function createMonaco(textarea, filename, editorOpts) {
rules: [
{
background: getColor('--color-code-bg'),
- }
+ },
],
colors: {
'editor.background': getColor('--color-code-bg'),
@@ -98,7 +98,7 @@ export async function createMonaco(textarea, filename, editorOpts) {
'input.foreground': getColor('--color-input-text'),
'scrollbar.shadow': getColor('--color-shadow'),
'progressBar.background': getColor('--color-primary'),
- }
+ },
});
// Quick fix: https://github.com/microsoft/monaco-editor/issues/2962
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js
index d99f606c8a..2469361c6e 100644
--- a/web_src/js/features/common-global.js
+++ b/web_src/js/features/common-global.js
@@ -335,7 +335,7 @@ export function initGlobalLinkActions() {
const data = await response.json();
window.location.href = data.redirect;
}
- }
+ },
}).modal('show');
}
diff --git a/web_src/js/features/comp/EasyMDEToolbarActions.js b/web_src/js/features/comp/EasyMDEToolbarActions.js
index 8286d5d871..c97d683704 100644
--- a/web_src/js/features/comp/EasyMDEToolbarActions.js
+++ b/web_src/js/features/comp/EasyMDEToolbarActions.js
@@ -139,7 +139,7 @@ export function easyMDEToolbarActions(EasyMDE, editor) {
},
icon: svg('octicon-chevron-right'),
title: 'Add Inline Code',
- }
+ },
};
for (const [key, value] of Object.entries(actions)) {
diff --git a/web_src/js/features/comp/SearchUserBox.js b/web_src/js/features/comp/SearchUserBox.js
index 541052c174..83d7044f11 100644
--- a/web_src/js/features/comp/SearchUserBox.js
+++ b/web_src/js/features/comp/SearchUserBox.js
@@ -22,7 +22,7 @@ export function initCompSearchUserBox() {
$.each(response.data, (_i, item) => {
const resultItem = {
title: item.login,
- image: item.avatar_url
+ image: item.avatar_url,
};
if (item.full_name) {
resultItem.description = htmlEscape(item.full_name);
@@ -37,15 +37,15 @@ export function initCompSearchUserBox() {
if (allowEmailInput && items.length === 0 && looksLikeEmailAddressCheck.test(searchQuery)) {
const resultItem = {
title: searchQuery,
- description: allowEmailDescription
+ description: allowEmailDescription,
};
items.push(resultItem);
}
return {results: items};
- }
+ },
},
searchFields: ['login', 'full_name'],
- showNoResults: false
+ showNoResults: false,
});
}
diff --git a/web_src/js/features/contextpopup.js b/web_src/js/features/contextpopup.js
index 51363b810a..ce90f3e505 100644
--- a/web_src/js/features/contextpopup.js
+++ b/web_src/js/features/contextpopup.js
@@ -37,7 +37,7 @@ export function attachRefIssueContextPopup(refIssues) {
interactiveBorder: 5,
onShow: () => {
el.firstChild.dispatchEvent(new CustomEvent('ce-load-context-popup', {detail: {owner, repo, index}}));
- }
+ },
});
}
}
diff --git a/web_src/js/features/contributors.js b/web_src/js/features/contributors.js
index 66185ac315..1d9cba5b9b 100644
--- a/web_src/js/features/contributors.js
+++ b/web_src/js/features/contributors.js
@@ -18,7 +18,7 @@ export async function initRepoContributors() {
loadingTitle: el.getAttribute('data-locale-loading-title'),
loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'),
loadingInfo: el.getAttribute('data-locale-loading-info'),
- }
+ },
});
View.mount(el);
} catch (err) {
diff --git a/web_src/js/features/eventsource.sharedworker.js b/web_src/js/features/eventsource.sharedworker.js
index 2ac7d93cc1..62581cf687 100644
--- a/web_src/js/features/eventsource.sharedworker.js
+++ b/web_src/js/features/eventsource.sharedworker.js
@@ -48,7 +48,7 @@ class Source {
this.eventSource.addEventListener(eventType, (event) => {
this.notifyClients({
type: eventType,
- data: event.data
+ data: event.data,
});
});
}
diff --git a/web_src/js/features/imagediff.js b/web_src/js/features/imagediff.js
index 2bac13b0bf..7b77b30ccc 100644
--- a/web_src/js/features/imagediff.js
+++ b/web_src/js/features/imagediff.js
@@ -20,19 +20,19 @@ function getDefaultSvgBoundsIfUndefined(text, src) {
if (img.width > 1 && img.width < MaxSize && img.height > 1 && img.height < MaxSize) {
return {
width: img.width,
- height: img.height
+ height: img.height,
};
}
if (svg.hasAttribute('viewBox')) {
const viewBox = svg.viewBox.baseVal;
return {
width: DefaultSize,
- height: DefaultSize * viewBox.width / viewBox.height
+ height: DefaultSize * viewBox.width / viewBox.height,
};
}
return {
width: DefaultSize,
- height: DefaultSize
+ height: DefaultSize,
};
}
return null;
@@ -42,15 +42,15 @@ export function initImageDiff() {
function createContext(image1, image2) {
const size1 = {
width: image1 && image1.width || 0,
- height: image1 && image1.height || 0
+ height: image1 && image1.height || 0,
};
const size2 = {
width: image2 && image2.width || 0,
- height: image2 && image2.height || 0
+ height: image2 && image2.height || 0,
};
const max = {
width: Math.max(size2.width, size1.width),
- height: Math.max(size2.height, size1.height)
+ height: Math.max(size2.height, size1.height),
};
return {
@@ -63,8 +63,8 @@ export function initImageDiff() {
Math.floor(max.width - size1.width) / 2,
Math.floor(max.height - size1.height) / 2,
Math.floor(max.width - size2.width) / 2,
- Math.floor(max.height - size2.height) / 2
- ]
+ Math.floor(max.height - size2.height) / 2,
+ ],
};
}
@@ -79,12 +79,12 @@ export function initImageDiff() {
path: this.getAttribute('data-path-after'),
mime: this.getAttribute('data-mime-after'),
$images: $container.find('img.image-after'), // matches 3 <img>
- $boundsInfo: $container.find('.bounds-info-after')
+ $boundsInfo: $container.find('.bounds-info-after'),
}, {
path: this.getAttribute('data-path-before'),
mime: this.getAttribute('data-mime-before'),
$images: $container.find('img.image-before'), // matches 3 <img>
- $boundsInfo: $container.find('.bounds-info-before')
+ $boundsInfo: $container.find('.bounds-info-before'),
}];
await Promise.all(imageInfos.map(async (info) => {
@@ -222,21 +222,21 @@ export function initImageDiff() {
sizes.image1.css({
width: sizes.size1.width * factor,
- height: sizes.size1.height * factor
+ height: sizes.size1.height * factor,
});
sizes.image2.css({
width: sizes.size2.width * factor,
- height: sizes.size2.height * factor
+ height: sizes.size2.height * factor,
});
sizes.image1.parent().css({
margin: `${sizes.ratio[1] * factor}px ${sizes.ratio[0] * factor}px`,
width: sizes.size1.width * factor + 2,
- height: sizes.size1.height * factor + 2
+ height: sizes.size1.height * factor + 2,
});
sizes.image2.parent().css({
margin: `${sizes.ratio[3] * factor}px ${sizes.ratio[2] * factor}px`,
width: sizes.size2.width * factor + 2,
- height: sizes.size2.height * factor + 2
+ height: sizes.size2.height * factor + 2,
});
// some inner elements are `position: absolute`, so the container's height must be large enough
@@ -248,7 +248,7 @@ export function initImageDiff() {
const $range = $container.find("input[type='range']");
const onInput = () => sizes.image1.parent().css({
- opacity: $range.val() / 100
+ opacity: $range.val() / 100,
});
$range.on('input', onInput);
onInput();
diff --git a/web_src/js/features/install.js b/web_src/js/features/install.js
index 2d6d345c1d..54ba3778f8 100644
--- a/web_src/js/features/install.js
+++ b/web_src/js/features/install.js
@@ -19,7 +19,7 @@ function initPreInstall() {
const defaultDbHosts = {
mysql: '127.0.0.1:3306',
postgres: '127.0.0.1:5432',
- mssql: '127.0.0.1:1433'
+ mssql: '127.0.0.1:1433',
};
const dbHost = document.getElementById('db_host');
diff --git a/web_src/js/features/org-team.js b/web_src/js/features/org-team.js
index 6ae3a90f4d..2236bc58bc 100644
--- a/web_src/js/features/org-team.js
+++ b/web_src/js/features/org-team.js
@@ -26,14 +26,14 @@ export function initOrgTeamSearchRepoBox() {
$.each(response.data, (_i, item) => {
items.push({
title: item.repository.full_name.split('/')[1],
- description: item.repository.full_name
+ description: item.repository.full_name,
});
});
return {results: items};
- }
+ },
},
searchFields: ['full_name'],
- showNoResults: false
+ showNoResults: false,
});
}
diff --git a/web_src/js/features/recent-commits.js b/web_src/js/features/recent-commits.js
index ded10d39be..030c251a05 100644
--- a/web_src/js/features/recent-commits.js
+++ b/web_src/js/features/recent-commits.js
@@ -11,7 +11,7 @@ export async function initRepoRecentCommits() {
loadingTitle: el.getAttribute('data-locale-loading-title'),
loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'),
loadingInfo: el.getAttribute('data-locale-loading-info'),
- }
+ },
});
View.mount(el);
} catch (err) {
diff --git a/web_src/js/features/repo-code.js b/web_src/js/features/repo-code.js
index c4a81ea165..08fae763b8 100644
--- a/web_src/js/features/repo-code.js
+++ b/web_src/js/features/repo-code.js
@@ -116,7 +116,7 @@ function showLineButton() {
tippy.popper.addEventListener('click', () => {
tippy.hide();
}, {once: true});
- }
+ },
});
}
diff --git a/web_src/js/features/repo-home.js b/web_src/js/features/repo-home.js
index 50f324d788..6ac7b96b9e 100644
--- a/web_src/js/features/repo-home.js
+++ b/web_src/js/features/repo-home.js
@@ -146,7 +146,7 @@ export function initRepoTopicBar() {
addedValue = addedValue.toLowerCase().trim();
$($addedChoice).attr('data-value', addedValue);
$($addedChoice).attr('data-text', addedValue);
- }
+ },
});
$.fn.form.settings.rules.validateTopic = function (_values, regExp) {
@@ -168,14 +168,14 @@ export function initRepoTopicBar() {
{
type: 'validateTopic',
value: /^\s*[a-z0-9][-.a-z0-9]{0,35}\s*$/,
- prompt: topicPrompts.formatPrompt
+ prompt: topicPrompts.formatPrompt,
},
{
type: 'maxCount[25]',
- prompt: topicPrompts.countPrompt
- }
- ]
+ prompt: topicPrompts.countPrompt,
+ },
+ ],
},
- }
+ },
});
}
diff --git a/web_src/js/features/repo-issue-content.js b/web_src/js/features/repo-issue-content.js
index f67a22ea6f..33ea55f027 100644
--- a/web_src/js/features/repo-issue-content.js
+++ b/web_src/js/features/repo-issue-content.js
@@ -60,7 +60,7 @@ function showContentHistoryDetail(issueBaseUrl, commentId, historyId, itemTitleH
},
onHide() {
$(this).dropdown('clear', true);
- }
+ },
});
$dialog.modal({
async onShow() {
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js
index c91dd06ac9..bf4ec15372 100644
--- a/web_src/js/features/repo-issue.js
+++ b/web_src/js/features/repo-issue.js
@@ -59,7 +59,7 @@ async function updateDeadline(deadlineString) {
try {
const response = await POST($('#update-issue-deadline-form').attr('action'), {
- data: {due_date: realDeadline}
+ data: {due_date: realDeadline},
});
if (response.ok) {
@@ -268,7 +268,7 @@ export function initRepoPullRequestUpdate() {
$pullUpdateButton.find('.button-text').text($choice.text());
$pullUpdateButton.data('do', $url);
}
- }
+ },
});
}
@@ -316,7 +316,7 @@ export function initRepoIssueReferenceRepositorySearch() {
$.each(response.data, (_r, repo) => {
filteredResponse.results.push({
name: htmlEscape(repo.repository.full_name),
- value: repo.repository.full_name
+ value: repo.repository.full_name,
});
});
return filteredResponse;
@@ -327,7 +327,7 @@ export function initRepoIssueReferenceRepositorySearch() {
const $form = $choice.closest('form');
$form.attr('action', `${appSubUrl}/${_text}/issues/new`);
},
- fullTextSearch: true
+ fullTextSearch: true,
});
}
@@ -443,7 +443,7 @@ export function initRepoPullRequestReview() {
}
window.scrollTo({
top: $commentDiv.offset().top - offset,
- behavior: 'instant'
+ behavior: 'instant',
});
}
}
@@ -661,7 +661,7 @@ export function initRepoIssueBranchSelect() {
// Replace branch name to keep translation from HTML template
$selectionTextField.html($selectionTextField.html().replace(
`${baseName}:${branchNameOld}`,
- `${baseName}:${branchNameNew}`
+ `${baseName}:${branchNameNew}`,
));
$selectionTextField.data('branch', branchNameNew); // update branch name in setting
};
@@ -695,7 +695,7 @@ export function initIssueTemplateCommentEditors($commentForm) {
const editor = await initComboMarkdownEditor($markdownEditor, {
onContentChanged: (editor) => {
$formField.val(editor.value());
- }
+ },
});
$formField.on('focus', async () => {
diff --git a/web_src/js/features/repo-settings.js b/web_src/js/features/repo-settings.js
index 0418f3a14a..58b714fbb7 100644
--- a/web_src/js/features/repo-settings.js
+++ b/web_src/js/features/repo-settings.js
@@ -39,7 +39,7 @@ export function initRepoSettingsCollaboration() {
$text.text('(none)'); // prevent from misleading users when the access mode is undefined
}
}, 0);
- }
+ },
});
});
}
@@ -56,15 +56,15 @@ export function initRepoSettingSearchTeamBox() {
$.each(response.data, (_i, item) => {
items.push({
title: item.name,
- description: `${item.permission} access` // TODO: translate this string
+ description: `${item.permission} access`, // TODO: translate this string
});
});
return {results: items};
- }
+ },
},
searchFields: ['name', 'description'],
- showNoResults: false
+ showNoResults: false,
});
}
diff --git a/web_src/js/features/repo-template.js b/web_src/js/features/repo-template.js
index 1e83e74780..5f63e8b3ba 100644
--- a/web_src/js/features/repo-template.js
+++ b/web_src/js/features/repo-template.js
@@ -29,13 +29,13 @@ export function initRepoTemplateSearch() {
const filteredResponse = {success: true, results: []};
filteredResponse.results.push({
name: '',
- value: ''
+ value: '',
});
// Parse the response from the api to work with our dropdown
$.each(response.data, (_r, repo) => {
filteredResponse.results.push({
name: htmlEscape(repo.repository.full_name),
- value: repo.repository.id
+ value: repo.repository.id,
});
});
return filteredResponse;
@@ -43,7 +43,7 @@ export function initRepoTemplateSearch() {
cache: false,
},
- fullTextSearch: true
+ fullTextSearch: true,
});
};
$('#uid').on('change', changeOwner);
diff --git a/web_src/js/features/repo-wiki.js b/web_src/js/features/repo-wiki.js
index d51bf35c81..03a2c68c5a 100644
--- a/web_src/js/features/repo-wiki.js
+++ b/web_src/js/features/repo-wiki.js
@@ -60,7 +60,7 @@ async function initRepoWikiFormEditor() {
'gitea-code-inline', 'code', 'quote', '|', 'gitea-checkbox-empty', 'gitea-checkbox-checked', '|',
'unordered-list', 'ordered-list', '|',
'link', 'image', 'table', 'horizontal-rule', '|',
- 'preview', 'fullscreen', 'side-by-side', '|', 'gitea-switch-to-textarea'
+ 'preview', 'fullscreen', 'side-by-side', '|', 'gitea-switch-to-textarea',
],
},
});
diff --git a/web_src/js/features/tribute.js b/web_src/js/features/tribute.js
index 055777be79..70a5de6913 100644
--- a/web_src/js/features/tribute.js
+++ b/web_src/js/features/tribute.js
@@ -25,7 +25,7 @@ function makeCollections({mentions, emoji}) {
},
menuItemTemplate: (item) => {
return `<div class="tribute-item">${emojiHTML(item.original)}<span>${htmlEscape(item.original)}</span></div>`;
- }
+ },
});
}
@@ -41,7 +41,7 @@ function makeCollections({mentions, emoji}) {
${item.original.fullname && item.original.fullname !== '' ? `<span class="fullname">${htmlEscape(item.original.fullname)}</span>` : ''}
</div>
`;
- }
+ },
});
}
diff --git a/web_src/js/features/user-auth-webauthn.js b/web_src/js/features/user-auth-webauthn.js
index 363e039760..6dfbb4d765 100644
--- a/web_src/js/features/user-auth-webauthn.js
+++ b/web_src/js/features/user-auth-webauthn.js
@@ -26,7 +26,7 @@ export async function initUserAuthWebAuthn() {
}
try {
const credential = await navigator.credentials.get({
- publicKey: options.publicKey
+ publicKey: options.publicKey,
});
await verifyAssertion(credential);
} catch (err) {
@@ -37,7 +37,7 @@ export async function initUserAuthWebAuthn() {
delete options.publicKey.extensions.appid;
try {
const credential = await navigator.credentials.get({
- publicKey: options.publicKey
+ publicKey: options.publicKey,
});
await verifyAssertion(credential);
} catch (err) {
@@ -185,7 +185,7 @@ async function webAuthnRegisterRequest() {
try {
const credential = await navigator.credentials.create({
- publicKey: options.publicKey
+ publicKey: options.publicKey,
});
await webauthnRegistered(credential);
} catch (err) {
diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js
index e7eb39f457..220c9e5512 100644
--- a/web_src/js/modules/tippy.js
+++ b/web_src/js/modules/tippy.js
@@ -148,7 +148,7 @@ export function initGlobalTooltips() {
const observerConnect = (observer) => observer.observe(document, {
subtree: true,
childList: true,
- attributeFilter: ['data-tooltip-content', 'title']
+ attributeFilter: ['data-tooltip-content', 'title'],
});
const observer = new MutationObserver((mutationList, observer) => {
const pending = observer.takeRecords();
diff --git a/web_src/js/standalone/swagger.js b/web_src/js/standalone/swagger.js
index cb91089daf..00854ef5d7 100644
--- a/web_src/js/standalone/swagger.js
+++ b/web_src/js/standalone/swagger.js
@@ -21,11 +21,11 @@ window.addEventListener('load', async () => {
docExpansion: 'none',
defaultModelRendering: 'model', // don't show examples by default, because they may be incomplete
presets: [
- SwaggerUI.presets.apis
+ SwaggerUI.presets.apis,
],
plugins: [
- SwaggerUI.plugins.DownloadUrl
- ]
+ SwaggerUI.plugins.DownloadUrl,
+ ],
});
window.ui = ui;
diff --git a/web_src/js/svg.js b/web_src/js/svg.js
index 6ad06f599d..3544b47c3d 100644
--- a/web_src/js/svg.js
+++ b/web_src/js/svg.js
@@ -189,7 +189,7 @@ export const SvgIcon = {
name: {type: String, required: true},
size: {type: Number, default: 16},
className: {type: String, default: ''},
- symbolId: {type: String}
+ symbolId: {type: String},
},
render() {
let {svgOuter, svgInnerHtml} = svgParseOuterInner(this.name);
diff --git a/web_src/js/utils/dom.js b/web_src/js/utils/dom.js
index aa7c2604aa..4a6adf478e 100644
--- a/web_src/js/utils/dom.js
+++ b/web_src/js/utils/dom.js
@@ -191,7 +191,7 @@ export function autosize(textarea, {viewportMarginBottom = 0} = {}) {
textarea.removeEventListener('mousemove', onUserResize);
textarea.removeEventListener('input', resizeToFit);
textarea.form?.removeEventListener('reset', onFormReset);
- }
+ },
};
}
diff --git a/web_src/js/webcomponents/polyfills.js b/web_src/js/webcomponents/polyfills.js
index 88c7276881..38f50fa02f 100644
--- a/web_src/js/webcomponents/polyfills.js
+++ b/web_src/js/webcomponents/polyfills.js
@@ -9,7 +9,7 @@ try {
return {
format(value) {
return ` ${value} ${options.unit}`;
- }
+ },
};
}
return intlNumberFormat(locales, options);
diff --git a/webpack.config.js b/webpack.config.js
index 321ae561a4..00952f90b4 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -178,7 +178,7 @@ export default {
],
},
},
- }
+ },
],
},
{
@@ -191,14 +191,14 @@ export default {
type: 'asset/resource',
generator: {
filename: 'fonts/[name].[contenthash:8][ext]',
- }
+ },
},
{
test: /\.png$/i,
type: 'asset/resource',
generator: {
filename: 'img/webpack/[name].[contenthash:8][ext]',
- }
+ },
},
],
},