Following the mobx documentation and creating the store class, I run into this eslint error. Fail in the first class property, but not in the rest...
import { makeAutoObservable } from 'mobx'
export default class DriverStore {
firstGivesError = [] // ESLint: Parsing error: Unexpected token =
noError = [] // no error
rootStore = null
constructor(rootStore) {
makeAutoObservable(this, {rootStore: false})
this.rootStore = rootStore
}
}
My eslintrc.json
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"airbnb"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
}
}
Does anyone have any idea why it happens?