简体   繁体   中英

eslint/standard gives paring error

I'm using standardJS (eslint). For this line I do get a parsing error: Unexpected token = (null) , which I do not understand:

static displayName = `WithData(${getComponentDisplayName(ComposedComponent)})`

Do I have to add any configuration? I am just using this in my package.json:

"standard": {
  "env": [
    "mocha"
  ],
  "global": [
    "React"
  ]
}

我为standardJS添加了"parser": "babel-eslint"选项。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM