Skip to content

Commit

Permalink
Merge branch 'main' into dev/alex/build-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aletya committed Apr 6, 2024
2 parents 0500284 + 562d3e8 commit 60d1e36
Show file tree
Hide file tree
Showing 5 changed files with 1,984 additions and 173 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["@typescript-eslint", "prettier"],
rules: {
"prettier/prettier": ["error"],
},
};
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint on Push and PR

on:
push:
branches:
- 'main'
- 'dev**'
pull_request:
branches:
- 'main'

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install dependencies
run: yarn
- name: Run ESLint
run: npx eslint .
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
"@types/express": "^4.17.21",
"@types/morgan": "^1.9.9",
"@types/node": "^20.9.3",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"eslint": "8.2.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react-hooks": "4.3.0",
"nodemon": "^3.0.1",
"prettier": "3.2.5",
"pm2": "5.3.1"
Expand All @@ -27,7 +39,7 @@
"mongoose": "^8.2.3",
"morgan": "^1.10.0",
"tsx": "^4.5.0",
"typescript": "^5.3.2",
"typescript": "*",
"zod": "^3.22.4"
}
}
8 changes: 4 additions & 4 deletions src/middleware/error-handler.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { NextFunction, Request, Response } from "express";

import { Request, Response } from "express";
// NextFunction
// TODO: Fix this function
function errorHandler(
err: Error,
_req: Request,
res: Response,
next: NextFunction
res: Response
// _next: NextFunction
) {
console.error("IN HERE", err.stack);
return res.status(500).send("Something broke!");
Expand Down
Loading

0 comments on commit 60d1e36

Please sign in to comment.