Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

ES-Lint friendly syntax fixes. #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 17, 2018

  1. ES-Lint friendly syntax fixes.

    1. 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.
    
    2. Changed an if/else logic to ternary one Which previously might give warnings with different es-lint configurations.
    3. Functions inside object with their body enclosed in `{` should have their fat-arrow functions enclosed in brackets. Eg -
    `var obj = { curr: (args) => {...} }` instead of `var obj = { curr: args => {...} } `.
    4. Fixed indentation.
    5. Arrow functions that return a JSX element without any logic, should prefer direct return instead of return inside curly braces. Check line freeCodeCamp#56
    ishtms committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    0718f9b View commit details
    Browse the repository at this point in the history