eslint-plugin-react-native icon indicating copy to clipboard operation
eslint-plugin-react-native copied to clipboard

Ensure each style property is on its own line when inside StyleSheet.create()

Open SrBrahma opened this issue 2 years ago • 1 comments

I usually first add my component styles inline and on the same line, if I expect them to be simple and unique. If they get too complex or are reused, I transfer them to the StyleSheet.create() in the bottom of the code.

For example, just dropped { color: '#141C4D', fontFamily: F.SF_Pro_Text_Medium, fontSize: 15, paddingHorizontal: 10, paddingVertical: 10 } there. Then I have to put a new line after each property.

I would really like a rule to have all styles properties in their own lines to save me some time.

SrBrahma avatar Jun 23 '22 19:06 SrBrahma

you can use prettier to fo that

boyuanjiang0-0 avatar Jan 17 '23 04:01 boyuanjiang0-0