updated scripts

This commit is contained in:
canove
2020-09-15 12:59:20 -03:00
parent b3cf16bbd3
commit 149cbef98e
3 changed files with 7 additions and 2 deletions

View File

@@ -16,6 +16,10 @@
},
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "_" }
],
"no-console": "off",
"no-param-reassign": "off",
"prettier/prettier": "error",

View File

@@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"build": "tsc",
"start": "nodemon dist/server.js",
"dev:server": "ts-node-dev --respawn --transpile-only --ignore node_modules src/server.ts"
},
"author": "",

View File

@@ -5,11 +5,11 @@ import cors from "cors";
import AppError from "./errors/AppError";
import routes from "./routes";
import "./database";
// import path from "path";
// import multer from "multer";
// import Sentry from "@sentry/node";
import "./database";
// const { initWbot } = require("./libs/wbot");
// const wbotMessageListener = require("./services/wbotMessageListener");
@@ -22,7 +22,7 @@ app.use(cors());
app.use(express.json());
app.use(routes);
app.use(async (err: Error, req: Request, res: Response, next: NextFunction) => {
app.use(async (err: Error, req: Request, res: Response, _: NextFunction) => {
if (err instanceof AppError) {
return res.status(err.statusCode).json({ error: err.message });
}