“Import in body of module; reorder to top import/first” ESLint (ReactJs)

穿精又带淫゛_ 提交于 2020-01-04 06:15:03

问题


When compiling my ReactJs code I get the following error import/first error:

The solutions presented in similar questions don't seem to work for me.

The ../recharts/es6/index.js file looks something like this:

import _Brush from './cartesian/Brush';
export { _Brush as Brush };
import _ReferenceLine from './cartesian/ReferenceLine';
export { _ReferenceLine as ReferenceLine };
import _ReferenceDot from './cartesian/ReferenceDot';
export { _ReferenceDot as ReferenceDot };
import _ReferenceArea from './cartesian/ReferenceArea';
export { _ReferenceArea as ReferenceArea };

My question, therefore, how does one disable the import/first rule for ESLint? Or might the error be due to something else entirely?

来源:https://stackoverflow.com/questions/49688260/import-in-body-of-module-reorder-to-top-import-first-eslint-reactjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!