I have a JavaScript class and inside it I have an async method which looks like below.
class ABC {
func = async () => { //----line 10
//some code
}
func2 = () => { //----line 11
//some code
}
}
When I run ESLint it's reporting one error. The application itself is working as expected.
unexpected token '=' at line 10 (& 11)
eslintrc.json
{
"env":{
"es2021":true
}
}
What do I need to do in order to get rid of these lint errors and still keep these methods as arrow functions?
ESLint version: eslint :"^7.32.0"