简体   繁体   中英

I can't see react lint errors in my browser console

I started a new ReactJS project, using npx create-react-app and I can't see lint errors in browser, but they are shown on vscode terminal. I really don't know what to do, I want the another way around, to be shown on browser console, and maybe not in terminal. I tried with different browsers, with the same outcome. This is the package.json file that it's used.

{
  "name": "react-project",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "antd": "^4.17.3",
    "i18next": "^21.6.3",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-i18next": "^11.15.1",
    "react-router-dom": "5",
    "react-scripts": "5.0.0",
    "web-vitals": "^2.1.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

It never happened with me, but try to stop your application, delete the node_modules folder and run npm i again to install all the dependencies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM