Open ishtms opened 6 years ago
I'm alright with every point except the first one. Ultimately this repo is a freecodecamp repo, let's make stuff as clear as possible in case anyone finishing the FCC curriculum wants to jump in.
@zhakkarn Actually, it's a good practice to use some_attr
instead of some_attr={true}
. I am pretty sure all campers who have reached react's curriculum are clever enough to find out if it's not mentioned in the curriculum. Anyways, do you want me to send another pull request after removing the first one?
it's a good practice
Why?
I am pretty sure all campers who have reached react's curriculum are clever enough
I am sure of it too. But the clearer the code, the faster we can move. I'd rather have the random contributor thinking about mail for good itself than React/JSX syntax. Even if it's for a handful of minutes.
do you want me to send another pull request after removing the first one?
I'm also convinced that you are clever enough to modify this pull request instead of submitting another one.
By default, ever property is true, and you don't need to specify
true
. Eg.<Component something={true} />
is same as<Component something />
but in this case, es-lint won't throw warnings with airbnb's configuration.Changed an if/else logic to ternary one Which previously might give warnings with different es-lint configurations.
Functions inside object with their body enclosed in
{
should have their fat-arrow functions enclosed in brackets. Eg -var obj = { curr: (args) => {...} }
instead ofvar obj = { curr: args => {...} }
.Fixed indentation.
Arrow functions that return a JSX element without any logic, should prefer direct return instead of return inside curly braces. Check line #56