Skip to content

fix: rule/no-single-element-style-arrays - exception when style prop is not an expression #262

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

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

sstur
Copy link
Contributor

@sstur sstur commented Jul 14, 2020

This fixes an issue when a React Native component has style prop that can be a string.

The most notable example of this is the default App.js (or App.tsx) in a new React Native app (initialized using expo init, as recommended by the RN docs). It looks like this:
Screen Shot 2020-07-14 at 16 04 13

Notice line 9 which contains: <StatusBar style="auto" />

That causes the following exception when running eslint:
Screen Shot 2020-07-14 at 16 11 06

@sstur
Copy link
Contributor Author

sstur commented Oct 16, 2020

Any chance we could get this unblocked? Anything I can do to help get it landed?

@hornta
Copy link

hornta commented Jan 25, 2021

Why is this not merged yet?

@Intellicode Intellicode merged commit b908186 into Intellicode:master Mar 23, 2021
@sstur
Copy link
Contributor Author

sstur commented May 4, 2021

Oh wow, I just realized this got merged, thanks @Intellicode!

Any chance we could get a release on npm? Anything I could do to help with this? I'm happy to pitch in maintaining this package if you want

@Intellicode
Copy link
Owner

@sstur Sorry for the delay, I have to make a release yes :) hopefully this weekend, or earlier if I remember. I definitely need help for maintenance, especially since I do not use react native myself anymore. However, I'm not sure yet how I want to set that up yet.

@Intellicode
Copy link
Owner

@sstur I have released a new version, let me know if there are any problems!

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

Successfully merging this pull request may close these issues.

3 participants