【发布时间】:2019-04-12 19:28:32
【问题描述】:
render() {
const { a, b } = this.props;
if (// some condition // )
window.location.assign('/v2#/org/' + a + '/support')}
}
对于 window.location.assign('/v2#/org/' + orgId + '/support')} 行,我收到 lint 错误 - 意外的字符串连接。
如何防止这种情况发生?
【问题讨论】:
-
查看 lint 规则定义了解一些提示和理由:eslint.org/docs/rules/prefer-template
标签: javascript reactjs lint