I installed babel-eslint and added "parser": "babel-eslint"
but I'm still getting parsing error.
My package.json is:
{
"name": "listassign",
"version": "0.1.0",
"private": true,
"dependencies": {
"bootstrap": "^4.4.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"parser": "babel-eslint",
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"babel-eslint": "^10.0.3"
},
"extends": [
"standard",
"standard-react"
]
}
I'm getting error in file:
function CharComponent(props){
let displayList = [];
function delete(e){
let index = e.target.id;
displayList.slice(index,1);
}
Error is:Parsing error: Unexpected keyword 'delete'
I did this but no help.