我有一个包含Codacy的存储库来检查代码的质量。当我试图做一个承诺,我得到这两个错误,我不知道如何修正.有什么帮助吗?
预期的财产速记.
在这一行中:this.state.notifications.push({name: name, url: inboxFolder.files[parseInt(index)].url});
在索引0中找到了具有非文字参数的fs.readFile
在这一行中:let fol = await this.fc.readFile(url.toString());
发布于 2020-04-10 19:21:58
第一个错误可以用以下代码行解决:
let url = inboxFolder.files[parseInt(index)].url;
this.state.notifications.push({name, url});发布于 2020-04-11 09:17:09
Codacy建议在javascript语言上使用2种良好做法。
(https://alligator.io/js/object-property-shorthand-es6/)
let url = inboxFolder.files[parseInt(index)].url;
this.state.notifications.push({name, url});https://stackoverflow.com/questions/61146651
复制相似问题