Chapter 8 Interacting with a Server

In Section 8.1, started up the code-cafe-backend server successfully, but got this “no fixes available” error from eslint when I tried to check in code. Haven’t changed anything in the code, any tips on what is causing the error and how to fix it?

husky > pre-commit (node v18.7.0)

rest-api@0.0.0 lint
eslint . --max-warnings=0

resources/react-resources/code-cafe-backend/routes/employees.js
8:20 error Parsing error: Unexpected token .

:heavy_multiplication_x: 1 problem (1 error, 0 warnings)

Changes to be committed:
(use “git restore --staged …” to unstage)
modified: code-cafe/package-lock.json
modified: code-cafe/package.json
modified: resources/react-resources/code-cafe-backend/package-lock.json

The code with the error is below:

resources/react-resources/code-cafe-backend/routes/employees.js

as well as the ESLint error in Visual Code:


Parsing error: Unexpected token .eslint

(parameter) req: Request<{}, any, any, qs.ParsedQs, Record<string, any>>