From c437366c3392ebd604a2e60f56f402315337474e Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sat, 1 Feb 2025 21:43:06 +0100 Subject: [PATCH] chore(eslint): run eslint --fix Signed-off-by: Philip Molares --- lib/migrations/20150702001020-update-to-0_3_1.js | 1 - lib/migrations/20160112220142-note-add-lastchange.js | 1 - lib/migrations/20160420180355-note-add-alias.js | 1 - lib/migrations/20160515114000-user-add-tokens.js | 1 - lib/migrations/20160607060246-support-revision.js | 1 - lib/migrations/20160703062241-support-authorship.js | 1 - lib/migrations/20161009040430-support-delete-note.js | 1 - lib/migrations/20161201050312-support-email-signin.js | 2 -- lib/migrations/20180525153000-user-add-delete-token.js | 1 - lib/migrations/20200321153000-fix-account-deletion.js | 1 - lib/realtime.js | 2 +- public/js/history.js | 2 +- public/js/index.js | 3 --- 13 files changed, 2 insertions(+), 16 deletions(-) diff --git a/lib/migrations/20150702001020-update-to-0_3_1.js b/lib/migrations/20150702001020-update-to-0_3_1.js index 16001f2e..7e037437 100644 --- a/lib/migrations/20150702001020-update-to-0_3_1.js +++ b/lib/migrations/20150702001020-update-to-0_3_1.js @@ -23,7 +23,6 @@ module.exports = { }).catch(function (error) { if (error.message === 'column "shortid" of relation "Notes" already exists' || error.message.toLowerCase().includes('duplicate column name')) { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20160112220142-note-add-lastchange.js b/lib/migrations/20160112220142-note-add-lastchange.js index 430e1cc1..acdbbfb6 100644 --- a/lib/migrations/20160112220142-note-add-lastchange.js +++ b/lib/migrations/20160112220142-note-add-lastchange.js @@ -10,7 +10,6 @@ module.exports = { }).catch(function (error) { if (error.message === 'column "lastchangeuserId" of relation "Notes" already exists' || error.message.toLowerCase().includes('duplicate column name')) { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20160420180355-note-add-alias.js b/lib/migrations/20160420180355-note-add-alias.js index 18afb9c0..3e436e34 100644 --- a/lib/migrations/20160420180355-note-add-alias.js +++ b/lib/migrations/20160420180355-note-add-alias.js @@ -10,7 +10,6 @@ module.exports = { }).catch(function (error) { if (error.message.toLowerCase().includes('duplicate column name') || error.message === 'column "alias" of relation "Notes" already exists') { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20160515114000-user-add-tokens.js b/lib/migrations/20160515114000-user-add-tokens.js index 33457824..01e1f949 100644 --- a/lib/migrations/20160515114000-user-add-tokens.js +++ b/lib/migrations/20160515114000-user-add-tokens.js @@ -6,7 +6,6 @@ module.exports = { }).catch(function (error) { if (error.message.toLowerCase().includes('duplicate column name') || error.message === 'column "accessToken" of relation "Users" already exists') { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20160607060246-support-revision.js b/lib/migrations/20160607060246-support-revision.js index fa2731b8..4f6f04bf 100644 --- a/lib/migrations/20160607060246-support-revision.js +++ b/lib/migrations/20160607060246-support-revision.js @@ -18,7 +18,6 @@ module.exports = { }).catch(function (error) { if (error.message.toLowerCase().includes('duplicate column name') || error.message === 'column "savedAt" of relation "Notes" already exists') { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20160703062241-support-authorship.js b/lib/migrations/20160703062241-support-authorship.js index c54dde61..b2e8f42d 100644 --- a/lib/migrations/20160703062241-support-authorship.js +++ b/lib/migrations/20160703062241-support-authorship.js @@ -19,7 +19,6 @@ module.exports = { }).catch(function (error) { if (error.message.toLowerCase().includes('duplicate column name') || error.message === 'column "authorship" of relation "Notes" already exists') { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20161009040430-support-delete-note.js b/lib/migrations/20161009040430-support-delete-note.js index 7b9b60cf..33e7b36c 100644 --- a/lib/migrations/20161009040430-support-delete-note.js +++ b/lib/migrations/20161009040430-support-delete-note.js @@ -4,7 +4,6 @@ module.exports = { return queryInterface.addColumn('Notes', 'deletedAt', Sequelize.DATE).catch(function (error) { if (error.message.toLowerCase().includes('duplicate column name') || error.message === 'column "deletedAt" of relation "Notes" already exists') { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20161201050312-support-email-signin.js b/lib/migrations/20161201050312-support-email-signin.js index 0ade8cd2..a0f44a03 100644 --- a/lib/migrations/20161201050312-support-email-signin.js +++ b/lib/migrations/20161201050312-support-email-signin.js @@ -5,7 +5,6 @@ module.exports = { return queryInterface.addColumn('Users', 'password', Sequelize.TEXT).catch(function (error) { if (error.message.toLowerCase().includes('duplicate column name') || error.message === 'column "password" of relation "Users" already exists') { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error @@ -14,7 +13,6 @@ module.exports = { }).catch(function (error) { if (error.message.toLowerCase().includes('duplicate column name') || error.message === 'column "email" of relation "Users" already exists') { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20180525153000-user-add-delete-token.js b/lib/migrations/20180525153000-user-add-delete-token.js index 2dc88dfb..1eb7f2be 100644 --- a/lib/migrations/20180525153000-user-add-delete-token.js +++ b/lib/migrations/20180525153000-user-add-delete-token.js @@ -7,7 +7,6 @@ module.exports = { }).catch(function (error) { if (error.message.toLowerCase().includes('duplicate column name') || error.message === 'column "deleteToken" of relation "Users" already exists') { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/migrations/20200321153000-fix-account-deletion.js b/lib/migrations/20200321153000-fix-account-deletion.js index d1296a08..257e30da 100644 --- a/lib/migrations/20200321153000-fix-account-deletion.js +++ b/lib/migrations/20200321153000-fix-account-deletion.js @@ -142,7 +142,6 @@ module.exports = { }) }).catch(function (error) { if (error.message.toLowerCase().includes('duplicate key on write or update')) { - // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { throw error diff --git a/lib/realtime.js b/lib/realtime.js index 66d606fa..fd1e54e2 100644 --- a/lib/realtime.js +++ b/lib/realtime.js @@ -242,7 +242,7 @@ function getStatus (callback) { }) models.User.count().then(function (regcount) { return callback - // eslint-disable-next-line n/no-callback-literal + ? callback({ onlineNotes: Object.keys(notes).length, onlineUsers: Object.keys(users).length, diff --git a/public/js/history.js b/public/js/history.js index 0dc3e5e5..1273af5f 100644 --- a/public/js/history.js +++ b/public/js/history.js @@ -220,7 +220,7 @@ export function getStorageHistory (callback) { if (typeof data === 'string') { data = JSON.parse(data) } callback(data) } - // eslint-disable-next-line n/no-callback-literal + callback([]) } diff --git a/public/js/index.js b/public/js/index.js index 878b8513..2ab7d713 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1408,7 +1408,6 @@ ui.modal.revision.on('show.bs.modal', function (e) { }) .fail(function (err) { if (debug) { - // eslint-disable-next-line no-console console.debug(err) } }) @@ -1530,7 +1529,6 @@ function selectRevision (time) { }) .fail(function (err) { if (debug) { - // eslint-disable-next-line no-console console.debug(err) } }) @@ -1613,7 +1611,6 @@ ui.modal.snippetImportProjects.change(function () { }) .fail(function (err) { if (debug) { - // eslint-disable-next-line no-console console.debug(err) } })