简体   繁体   English

eslint / standard给出配对错误

[英]eslint/standard gives paring error

I'm using standardJS (eslint). 我正在使用standardJS(eslint)。 For this line I do get a parsing error: Unexpected token = (null) , which I do not understand: 对于这一行,我确实得到了一个parsing error: Unexpected token = (null) ,我不明白:

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

Do I have to add any configuration? 我是否需要添加任何配置? I am just using this in my package.json: 我只是在我的package.json中使用它:

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WebStorm eslint-config-standard错误 - WebStorm eslint-config-standard error ESlint 给出了关于类中索引器签名的错误 - ESlint gives error about the indexer signature in class 导出打字稿接口会产生错误提示 - Exporting typescript interfaces gives eslint error eslint 命令在 CI 服务器上失败,并出现错误“ESLint 找不到要扩展的配置”标准“” - eslint command fails on CI Server with error “ESLint couldn't find the config ”standard“ to extend from” VSCode ESlint 和 React Typescript 声明类型报错 - VSCode ESlint and React Typescript declaring type gives an error Vue 2 - ESLint + 标准 + 更漂亮 - Vue 2 - ESLint + Standard + Prettier 如何忽略标准中的 eslint 规则 - How to ignore eslint rules in standard Eslint 给出错误:规则“严格”的配置无效:值“错误”是错误的类型 - Eslint gives error: Configuration for rule "strict" is invalid: Value "error" is the wrong type 当 types.ts 中存在任何枚举时,为什么 eslint 会给出错误消息? - Why eslint gives an error message when any enum present in types.ts? esLint 报错 for-in 的主体应该包裹在 if 语句中,以过滤原型中不需要的属性 - esLint gives error The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM