electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.
https://www.bloomclimate.com
MIT License
434 stars 104 forks source link

Updates ESLint extensions #354

Closed madsnedergaard closed 4 years ago

madsnedergaard commented 4 years ago

This PR fixes eslint extensions (I forgot the prettier/react plugin).

It also removes the react/jsx-one-expression-per-line rule, as it clashes with Prettier. Let me know if you think we need to keep it, as this is a bit more controversial.

Before:

<header className="App-header">
  <h2>North App Playground</h2>
  <p>
    status:
    {' '}
    {connectionStatus}
  </p>
  <button type="button">
    Link
    {' '}
    {icon}
  </button>
</header>

After:

<header className="App-header">
  <h2>North App Playground</h2>
  <p>status: {connectionStatus}</p>
  <button type="button">Link {icon}</button>
</header>
madsnedergaard commented 4 years ago

Now that I have removed husky, the rule changed doesn't matter as much, so if you'd prefer I can just revert that part and get this one merged in faster (so that I can bump contrib and get PR in mono-repo merged) @corradio