javascript - How to format code of react native in atom -


i working on react-native app. using atom text editor development of react-native apps.

i did not find shortcut format react-native code in atom. tried beautify package https://atom.io/packages/atom-beautify not working.

import react, {     component } 'react'; import {     appregistry,     image,     view,     text,     button,     stylesheet } 'react-native';  class splashscreen extends component {     render() {         return ( <             view style = {                 styles.container             } >             <             image source = {                 require('./img/talk_people.png')             }             style = {                 {                     width: 300,                     height: 300                 }             }             /> <             text style = {                 {                     fontsize: 22,                     textalign: 'center',                     margintop: 30                 }             } > never forget stay in touch people matter you. < /text> <             view style = {                 {                     margintop: 30                 }             } > < button title = "continue"             color = "#fe434c" / > < /view> <             /view>         );     } }  const styles = stylesheet.create({     container: {         backgroundcolor: '#ffffff',         margin: 50,         alignitems: 'center',         flex: 1,         flexdirection: 'column'     } })  appregistry.registercomponent('scheduled', () => splashscreen); 

i highly recommend prettier-atom.

prettier has been getting lot of attention lately, , reason.

it's straight forward, opinionated javascript formatter limited set of options suit style. comes optional eslint integration if need more control.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -