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:
parent
3df33799c1
commit
bc17cba835
5 changed files with 58 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue