mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-31 07:08:06 +08:00
Add eslint-plugin-sonarjs (#20431)
We had this plugin before but it was removed as it became outdated, now it was updated again, so it's compatible again. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@ -140,7 +140,7 @@ function updateStopwatchData(data) {
|
||||
$('.stopwatch-cancel').attr('action', `${issueUrl}/times/stopwatch/cancel`);
|
||||
$('.stopwatch-issue').text(`${repo_owner_name}/${repo_name}#${issue_index}`);
|
||||
$('.stopwatch-time').text(prettyMilliseconds(seconds * 1000));
|
||||
updateStopwatchTime(seconds);
|
||||
updateTimeInterval = updateStopwatchTime(seconds);
|
||||
btnEl.removeClass('hidden');
|
||||
}
|
||||
|
||||
@ -149,10 +149,10 @@ function updateStopwatchData(data) {
|
||||
|
||||
function updateStopwatchTime(seconds) {
|
||||
const secs = parseInt(seconds);
|
||||
if (!Number.isFinite(secs)) return;
|
||||
if (!Number.isFinite(secs)) return null;
|
||||
|
||||
const start = Date.now();
|
||||
updateTimeInterval = setInterval(() => {
|
||||
return setInterval(() => {
|
||||
const delta = Date.now() - start;
|
||||
const dur = prettyMilliseconds(secs * 1000 + delta, {compact: true});
|
||||
$('.stopwatch-time').text(dur);
|
||||
|
Reference in New Issue
Block a user