问题描述
按照 mobx 文档并创建商店类,我遇到了这个 eslint 错误。在第一类属性中失败,但在其余属性中没有......
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
}
}
我的 eslintrc.json
{
"env": {
"browser": true,"es2021": true
},"extends": [
"plugin:react/recommended","airbnb"
],"parserOptions": {
"ecmaFeatures": {
"jsx": true
},"ecmaVersion": 12,"sourceType": "module"
},"plugins": [
"react"
],"rules": {
}
}
有人知道为什么会这样吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)