aeternity / aepp-components

deprecated: aepp-components to be used in all aepps.
ISC License
41 stars 14 forks source link

Make validators consistent #145

Closed davidyuk closed 6 years ago

davidyuk commented 6 years ago

@sadiqevani Arrow functions should be enough obvious because they were introduced in ES6 four years ago. object-shorthand rule of Airbnb configs (that you have chosen in #160) rejects code like:

const t = {
  validator: function() {
    // ...
  }
}

at least should be used:

const t = {
  validator() {
    // ...
  }
}

but arrow functions, in this case, is better because it is shorter:

Also, functions starting with () => without curly brackets are easier to read, because: