I'm having trouble getting rid of an error on my the equals sign =. I'm using eslint recommended settings and tried using the experimentalobjectrestspread to rectify the issue from another answer on here.
The error still persists.
Here is my eslint file.
{
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"env": {
"node": true,
"browser": true,
"es6": true
},
"rules": {
"no-console": "off",
"no-unused-vars": "off"
}
}
Code with error (only on the first equals after onSubmit)
export class AddExp extends React.Component {
onSubmit = (expense) => {
this.props.addExpense(expense);
this.props.history.push('/');
};