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;