checkup icon indicating copy to clipboard operation
checkup copied to clipboard

ember-es6-class/no-object-extend rule

Open hmajoros opened this issue 4 years ago • 2 comments

https://github.com/checkupjs/checkup/blob/8f88c8ba8bdc03bdb417fec1bfbcaff9de0ac5de/packages/checkup-plugin-ember-octane/src/utils/task-configs.ts#L12

any reason this chunk isn't using the no-object-extend rule defined here? https://github.com/scalvert/eslint-plugin-ember-es6-class

this is what our team used to track our native class migration

hmajoros avatar May 27 '20 19:05 hmajoros

Hey @hmajoros, thanks for the issue, and this is a good question.

There's no real reason - we could likely add it to the rest of the rules to ensure we're covering all our bases.

Thanks for the suggestion!

scalvert avatar May 27 '20 20:05 scalvert

@scalvert is there a reason we should be using no-extend-object over the combo of the standard Ember ember/no-classic-classes and ember/no-mixins? Seems like the combination of the two cover the enforcement of ES6 Classes and removing .extend which is only used for mixins at this point.

The only possible corner case I can see is that engineers are using ES6 classes with .extend outside of mixins, but that seems irresponsible considering they should just be using ES6 class extension.

lbdm44 avatar Jan 04 '21 22:01 lbdm44