From 894b0a41c7b38ce6b403e56f15954416774bb01b Mon Sep 17 00:00:00 2001 From: marcustyphoon Date: Mon, 13 Jan 2025 08:30:49 -0800 Subject: [PATCH] Linter: Fix moment global (#2187) --- .eslintrc.yml | 1 + Extensions/auto_tagger.js | 3 --- Extensions/bookmarker.js | 3 --- Extensions/outbox.js | 2 -- Extensions/profiler.js | 2 -- Extensions/timestamps.js | 3 --- 6 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index c0a4f6808..125dfdea8 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -52,6 +52,7 @@ globals: BigInt: readonly _: readonly + moment: readonly XKit: writable XBridge: writable centerIt: writable diff --git a/Extensions/auto_tagger.js b/Extensions/auto_tagger.js index fd304a4be..2b31be3fe 100644 --- a/Extensions/auto_tagger.js +++ b/Extensions/auto_tagger.js @@ -227,9 +227,6 @@ XKit.extensions.auto_tagger = new Object({ }, return_date_tag: function() { - // defined in moment.js - /* globals moment */ - var nowdate = new Date(); var nowdatem = moment(nowdate); var m_date = nowdatem.format("Do[,]MMMM[,]YYYY[,]MMMM Do YYYY"); diff --git a/Extensions/bookmarker.js b/Extensions/bookmarker.js index 107094b87..b0dae4388 100644 --- a/Extensions/bookmarker.js +++ b/Extensions/bookmarker.js @@ -234,9 +234,6 @@ XKit.extensions.bookmarker = new Object({ }, create_bookmark_div: function(current_bookmark) { - // defined in moment.js - /* globals moment */ - var nowdate = new Date(); var nowdatem = moment(nowdate); diff --git a/Extensions/outbox.js b/Extensions/outbox.js index a96ce10f2..54c22fa77 100644 --- a/Extensions/outbox.js +++ b/Extensions/outbox.js @@ -542,8 +542,6 @@ XKit.extensions.outbox = new Object({ var m_date = ""; if (obj.time !== "" && typeof obj.time !== "undefined") { - // defined in moment.js - /* globals moment */ var moment_val = moment(obj.time); m_day = moment_val.format('ddd'); m_date = moment_val.format('MM/DD/YY hh:mm a'); diff --git a/Extensions/profiler.js b/Extensions/profiler.js index 8097cdeb4..dc64e1aa0 100644 --- a/Extensions/profiler.js +++ b/Extensions/profiler.js @@ -359,8 +359,6 @@ XKit.extensions.profiler = new Object({ var data = JSON.parse(response.responseText).response; var dtx = new Date(data.blog.updated * 1000); - // defined in moment.js - /* globals moment */ var dt = moment(dtx); $("#xkit-profiler-last-update").removeClass("loading-up").html(dt.from(new Date())); diff --git a/Extensions/timestamps.js b/Extensions/timestamps.js index b4ddc6249..55d534f13 100644 --- a/Extensions/timestamps.js +++ b/Extensions/timestamps.js @@ -7,9 +7,6 @@ //* BETA false **// //* SLOW true **// -// depends on moment.js -/* globals moment */ - XKit.extensions.timestamps = new Object({ running: false,