I'm running a react app using a yarn package manager. I'm getting the aforementioned ESLint error. I have tried the following to fix it:
- Deleted package-lock.json and node modules and installed yarn and ran yarn init
- Modified the eslint-plugin.js file to include the following at the top of the file:
I used both of these at different times to no avail:
this.CliEngineCtor = require(this.basicPath).CLIEngine;
this.CliEngineCtor = require(this.basicPath).CLIEngineCtor;
Pertinent package.json entry:
{
"name": "react-millionaire-quiz",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "^5.0.0",
"web-vitals": "^2.1.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"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"
]
},
"devDependencies": {
"eslint": "^8.7.0"
},
I tried changing the eslint to lower versions, but that just created other problems breaking other dependencies and creating other errors.
How can this be fixed, or do I have to disable ESLint?
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment