Skip to content

Commit 0f84d5e

Browse files
committed
fix: eslint issue
1 parent 35c2a2f commit 0f84d5e

28 files changed

+54
-65
lines changed

.eslintrc.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

eslint.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ export default [
3232
"no-console": "error",
3333

3434
// Mocha rules
35+
"mocha/no-pending-tests": "error",
3536
"mocha/no-exclusive-tests": "error",
3637

3738
// Prettier for formatting
3839
"prettier/prettier": "error",
3940

40-
"no-unused-vars": "off",
41+
"no-unused-vars": "warn",
4142
},
42-
ignores: ["public/*", "dist/*"],
4343
},
4444
];

models/items.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const getItemBasedOnFilter = async (query) => {
7070
try {
7171
let call = itemTagsModel;
7272
Object.keys(query).forEach((key) => {
73+
// eslint-disable-next-line security/detect-object-injection
7374
call = call.where(key, "==", query[key]);
7475
});
7576
const items = [];

models/logs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ const fetchLogs = async (query, param) => {
4646
try {
4747
let call = logsModel.where("type", "==", param);
4848
Object.keys(query).forEach((key) => {
49+
// eslint-disable-next-line security/detect-object-injection
4950
if (key !== "limit" && key !== "lastDocId") {
51+
// eslint-disable-next-line security/detect-object-injection
5052
call = call.where(key, "==", query[key]);
5153
}
5254
});

models/userStatus.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-console */
12
const { Forbidden, NotFound } = require("http-errors");
23
const admin = require("firebase-admin");
34
const firestore = require("../utils/firestore");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"morgan": "1.10.0",
3737
"multer": "1.4.5-lts.1",
3838
"newrelic": "11.19.0",
39-
"nodemailer": "6.7.3",
39+
"nodemailer": "7.0.3",
4040
"nodemailer-mock": "2.0.8",
4141
"passport": "0.7.0",
4242
"passport-github2": "0.1.12",

server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ function onError(error) {
5454
case "EACCES":
5555
logger.error(bind + " requires elevated privileges");
5656
process.exit(1);
57-
57+
// eslint-disable-next-line no-unreachable
5858
break;
5959

6060
case "EADDRINUSE":
6161
logger.error(bind + " is already in use");
6262
process.exit(1);
63-
63+
// eslint-disable-next-line no-unreachable
6464
break;
6565

6666
default:

services/discordService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const setInDiscordFalseScript = async () => {
4444
const updateUsersPromises = [];
4545
users.forEach((user) => {
4646
const id = user.id;
47-
47+
// eslint-disable-next-line security/detect-object-injection
4848
delete user[id];
4949
const userData = {
5050
...user,

test/fixtures/discordResponse/discord-response.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ const getOnboarding31DPlusMembers = [
273273
nick: "john",
274274
pending: false,
275275
premium_since: null,
276-
276+
// eslint-disable-next-line no-loss-of-precision
277277
roles: ["9876543210", "11334336"],
278278
user: {
279279
id: "9653710123456",

test/integration/contributions.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-unused-expressions */
12
const chai = require("chai");
23
const sinon = require("sinon");
34
const { expect } = chai;

0 commit comments

Comments
 (0)