【发布时间】:2016-03-11 13:23:47
【问题描述】:
在以下代码的第 4 行,ESLint 给我一个解析错误:
意外的令牌 =
我想知道为什么会这样?代码运行正常。我做错了什么?
import { Component, PropTypes } from 'react';
export default class MainApp extends Component {
static propTypes = {
children: PropTypes.any.isRequired
}
componentWillMount() {
require('./styles/main.styl');
}
render() {
return (
<div>
{this.props.children}
</div>
);
}
}
【问题讨论】:
标签: javascript reactjs react-jsx eslint