Skip to content

Commit

Permalink
Linter: Fix moment global (#2187)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon authored Jan 13, 2025
1 parent abbe53a commit 894b0a4
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
globals:
BigInt: readonly
_: readonly
moment: readonly
XKit: writable
XBridge: writable
centerIt: writable
Expand Down
3 changes: 0 additions & 3 deletions Extensions/auto_tagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
3 changes: 0 additions & 3 deletions Extensions/bookmarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions Extensions/outbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 0 additions & 2 deletions Extensions/profiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down
3 changes: 0 additions & 3 deletions Extensions/timestamps.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
//* BETA false **//
//* SLOW true **//

// depends on moment.js
/* globals moment */

XKit.extensions.timestamps = new Object({

running: false,
Expand Down

0 comments on commit 894b0a4

Please sign in to comment.