我刚刚使用webpacker
gem 启动了一个新的 ruby on rails 应用程序。我也在使用material-ui
and eslint-config-airbnb
。运行 linter 后,我收到此错误:
Missing file extension "css" for "typeface-roboto" import/extensions
.
eslintrc.json
module.exports = {
"extends": "airbnb",
"env": {
"browser": true,
},
};
索引.jsx
import 'typeface-roboto'; // this is the import causing the issue
import React from 'react';
import ReactDOM from 'react-dom';
import Application from './app';
ReactDOM.render(<Application />, document.getElementById('root'));