eslint-plugin-import error
See original GitHub issueSummary
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
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:15 (6 by maintainers)
Top Results From Across the Web
eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >node.js - Failed to load plugin import: 'eslint-plugin-import'
I'm new to react. I'm following the tutorial steps installing node. However, when I run npm start , errors keep show up. Failed...
Read more >Issues · import-js/eslint-plugin-import - GitHub
ESLint plugin with rules that help validate proper imports. ... error 'react' should be listed in the project's dependencies.
Read more >node_modules/eslint-plugin-import · master - PLMlab
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All...
Read more >eslint-plugin-import | Yarn - Package Manager
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.