Intellicode / eslint-plugin-react-native

React Native plugin for ESLint
MIT License
722 stars 130 forks source link

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

Closed sstur closed 3 years ago

sstur commented 4 years ago

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 commented 4 years ago

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

hornta commented 3 years ago

Why is this not merged yet?

sstur commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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