Scramblelock / starwars

A webpage of Star Wars characters created using React
1 stars 0 forks source link

Introduce some code style tools to avoid indentation and similar issues #1

Open SoHotSoup opened 6 years ago

SoHotSoup commented 6 years ago

https://github.com/Scramblelock/starwars/blob/6658875849bb1fbde758f7d057616adf3da8ed97/src/containers/App.js#L9

This is not a high priority at this stage of learning, but it is an industry standard. Your code should always be well formatted, because of readability. Your code will be more easy to understand.

Install and configure eslint and prettier: https://www.npmjs.com/package/eslint https://www.npmjs.com/package/prettier

popular code style in React community is this https://github.com/airbnb/javascript

SoHotSoup commented 6 years ago

Also, setup your editor to use 2 spaces for indentation, and to remove trailing whitespaces at each save. :) Your code looks unformatted at github because tabs and spaces are mixed actually.