i am starting new project with purchasing theme. the dependenci provide with theme has older virsion so am trying to update it with npm update and removie some dipendency also.
after the removing all unnesecery dependency i just hit npm i and npm start but i got this problem.
ESLint configuration in ..\package.json is invalid:
- Unexpected top-level property "babelOptions".
i tried to solve it but did not get any answer.
thanks for help.
here is my package.json file.
{
{
"name": "react-hook",
"version": "2.0.0",
"private": true,
"dependencies": {
"@reduxjs/toolkit": "^1.9.5",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"autoprefixer": "^10.4.13",
"axios": "^1.2.1",
"axios-mock-adapter": "^1.21.2",
"babel-eslint": "^10.1.0",
"bootstrap": "^5.3.0",
"classnames": "^2.3.2",
"date-fns": "^2.30.0",
"eslint": "^8.30.0",
"firebase": "^10.1.0",
"formik": "^2.2.9",
"framer-motion": "^10.12.18",
"i18next": "^23.4.1",
"i18next-browser-languagedetector": "^7.1.0",
"lodash": "^4.17.21",
"lodash.clonedeep": "^4.5.0",
"metismenujs": "^1.3.1",
"node-sass": "^9.0.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-calendar": "^4.6.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-i18next": "^13.0.3",
"react-ios-time-picker": "^0.2.2",
"react-redux": "^8.1.2",
"react-router-dom": "^6.6.1",
"react-script": "^2.0.5",
"react-scripts": "^5.0.1",
"react-slick": "^0.29.0",
"react-time-picker": "^6.5.0",
"reactstrap": "^9.1.5",
"redux": "^4.2.1",
"redux-form": "^8.3.10",
"redux-persist": "^6.0.0",
"redux-saga": "^1.2.3",
"reselect": "^4.1.8",
"simplebar-react": "^3.2.4",
"slick-carousel": "^1.8.1",
"styled-components": "^6.0.7",
"toastr": "^2.1.4",
"yup": "^1.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build --max_old_space_size=8000 build",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"format": "prettier --write \"**/*.{js,jsx,json,md,html,css,less,scss}\"",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"babelOptions": {
"presets": [
"@babel/preset-react"
]
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true
},
"globals": {
"$": true
},
"settings": {
"react": {
"version": "^17.0.1"
}
},
"rules": {
"semi": [
"error",
"never"
]
}
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"resolutions": {
"moment": "2.29.1",
"autoprefixer": "10.4.5"
},
"devDependencies": {
"eslint-config-standard-react": "^9.2.0",
"eslint-plugin-react": "^7.20.6",
"prettier": "^2.1.1"
}
}
}
and here is my .eslintrc file.
{
"rules": {
"no-undef": "off",
"react/prop-types" : "off",
"react/no-unescaped-entities": 0
},
"extends": [
"plugin:react/recommended"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true,
"experimentalObjectRestSpread": true
}
}
}
i also try with this in .eslintrc
{
"rules": {
"no-undef": "off","react/prop-types": "off"
},
"extends": [
"plugin:react/recommended"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"presets": ["@babel/preset-react"],
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true,
"experimentalObjectRestSpread": true
}
}
}