From 139054f06f8b80c9e0439fb758784811088da659 Mon Sep 17 00:00:00 2001 From: hosead6168 Date: Thu, 2 Sep 2021 21:07:29 -0500 Subject: [PATCH] fix(*): added config files --- .eslintrc.js | 14 -------------- .gitignore | 1 + jest.config.js | 4 ++++ utils/auth.js | 4 ++-- 4 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 .eslintrc.js create mode 100644 jest.config.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index d53a2c89..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - "env": { - "node": true, - "es2020": true, - "jest": true - }, - "extends": "eslint:recommended", - "rules": { - "no-empty": "error", - "no-multiple-empty-lines": "warn", - "no-var": "error", - "prefer-const": "error" - } -}; diff --git a/.gitignore b/.gitignore index d1e80f55..e29c53c1 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ index.js testing.md test/db.js images +.eslintrc.cjs diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 00000000..05f8b29c --- /dev/null +++ b/jest.config.js @@ -0,0 +1,4 @@ +module.export = { + "verbose": true, + "preset": "@shelf/jest-mongodb" +} diff --git a/utils/auth.js b/utils/auth.js index a089aca3..01322b3a 100644 --- a/utils/auth.js +++ b/utils/auth.js @@ -1,4 +1,4 @@ -const jwt = require("jsonwebtoken"); +import jwt from "jsonwebtoken"; const auth = (req, res, next) => { try { @@ -20,4 +20,4 @@ const auth = (req, res, next) => { } }; -module.exports = auth; \ No newline at end of file +export default auth;