Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove eslint import plugin override for React Native imports #14

Closed
richiemccoll opened this issue Feb 17, 2021 · 2 comments
Closed

Remove eslint import plugin override for React Native imports #14

richiemccoll opened this issue Feb 17, 2021 · 2 comments

Comments

@richiemccoll
Copy link
Contributor

The import plugin for ESLint doesn't find React Native components. Remove the override and comment from .eslintrc setting when this issue is fixed.

For more info see: facebook/react-native#28549

@castarco
Copy link
Contributor

castarco commented Mar 24, 2022

I checked the current status of this issue, and I can't reproduce the problem anymore when I remove that override, but a different one appears.

It does not complain about its inability to find the React Native components, but about parsing problems:

/home/username/Code/optic-expo/src/components/Actions.tsx
  2:28  error  Parse errors in imported module 'react-native': ';' expected. (14:32)  import/namespace

The import line being:

import { StyleSheet } from 'react-native'

And the one really being at fault, in node_modules/react-native/index.js:

// Well, this one and many more with this same shape
import typeof StyleSheet from './Libraries/StyleSheet/StyleSheet';

The linter seems to struggle with this construct, adding the keyword typeof just before the imported object's name. I believe it's related with Flow. I'm checking how to skip that check or how to tell the linter to understand Flow's syntax.

@simoneb
Copy link
Member

simoneb commented Mar 24, 2022

Thanks for looking into this. It's not a big issue really, we can leave this (or rephrase based on your latest findings) and wait for a solution to come to us.

@simoneb simoneb closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants