react-native-device-info: eslint-plugin-import error
Summary
Version | react-native-device-info@0.21.5 |
Affected OS | NA |
OS Version | NA |
Current behavior
eslint-plugin-import@2.11.0
detects an error when importing the module
import DeviceInfo from 'react-native-device-info';
Expected behavior
No error
Why
I think that eslint-plugin-import
finds an import
statement in deviceinfo.js
so it expects that the module uses export
statements. deviceinfo.js
should use only import
and export
or only require(...)
and module.exports
.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 15 (6 by maintainers)
Commits related to this issue
- #403: Fix eslint-plugin-import error — committed to schumannd/react-native-device-info by schumannd 6 years ago
- #403: Fix eslint-plugin-import error (#466) — committed to react-native-device-info/react-native-device-info by schumannd 6 years ago
@schumannd nope. starting from 0.22.3 it is broken. any type of import give an error
UPDATE:
fixes the issue
@peacechen you have to use
export default {
, it solves eslint issue.