Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 346 Bytes

no-on-calls-in-components.md

File metadata and controls

15 lines (11 loc) · 346 Bytes

Don't use .on() calls as components values

Rule name: no-on-calls-in-components

Prevents using .on() in favour of component's lifecycle hooks.

export default Component.extend({
  // BAD
  abc: on('didInsertElement', function () { /* custom logic */ }),

  // GOOD
  didInsertElement() { /* custom logic */ }
});