eslint在第11行抱怨以下模块。src / index.js第11行:分析错误:意外的令牌/
import React from 'react';
import { render } from 'react-dom';
import './assets/css/index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { AppContainer } from 'react-hot-loader';
const render_ = () => {
render(
<AppContainer>
<App />
</AppContainer>,
document.getElementById('root')
);
};
registerServiceWorker();
render_();
if (module.hot) {
module.hot.accept('./App', () => {
render_();
});
}
我正在使用eslint-config-airbnb,.eslintrc.js中的parserOptions字段如下所示:
"parserOptions": {
"ecmaFeatures": {
"globalReturn": true,
"generators": false,
"objectLiteralDuplicateProperties": false,
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},