Repository: ember-cli/eslint-plugin-ember (js)

Issue:
`require-super-in-init` rule causes build failure with "Cannot read property 'name' of undefined"
Strange problem with `require-super-in-init` 

```
- errorMessage: Build Canceled: Broccoli Builder ran into an error with `EslintValidationFilter` plugin. 💥
Cannot read property 'name' of undefined
  - errorType: Build Error
  - location:
    - column: [undefined]
    - file: addon/utils/query-params-filter-mixin-factory.js
    - line: [undefined]
    - treeDir: /Users/d_dovgan/dev/Projects/application/tmp/broccoli_persistent_filtereslint_validation_filter-input_base_path-FlLfiKrr.tmp
  - message: Build Canceled: Broccoli Builder ran into an error with `EslintValidationFilter` plugin. 💥
Cannot read property 'name' of undefined
  - name: Error
  - nodeAnnotation: broccoli-persistent-filter:EslintValidationFilter
  - nodeName: EslintValidationFilter
  - originalErrorMessage: Cannot read property 'name' of undefined
  - stack: TypeError: Cannot read property 'name' of undefined
    at CallExpression.ember.getModuleProperties.find.property (/Users/d_dovgan/dev/Projects/application/node_modules/eslint-plugin-ember/lib/rules/require-super-in-init.js:36:92)
    at Array.find (native)
    at CallExpression (/Users/d_dovgan/dev/Projects/application/node_modules/eslint-plugin-ember/lib/rules/require-super-in-init.js:36:62)
    at listeners.(anonymous function).forEach.listener (/Users/d_dovgan/dev/Projects/application/node_modules/eslint/lib/util/safe-emitter.js:47:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/d_dovgan/dev/Projects/application/node_modules/eslint/lib/util/safe-emitter.js:47:38)
    at NodeEventGenerator.applySelector (/Users/d_dovgan/dev/Projects/application/node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/Users/d_dovgan/dev/Projects/application/node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (/Users/d_dovgan/dev/Projects/application/node_modules/eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (/Users/d_dovgan/dev/Projects/application/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
```

here is small repository with reproduction [link](https://github.com/Sinled/require-super-in-init-bug/blob/master/app/utils/query-params-filter-mixin-factory.js)

build fails when i use object spread, 
i can fix build with `object.assign` but it seems that the problem is not in my code?



Pull request:
Fix spread property bug in `require-super-in-init` rule
Fixes #234.

CC: @NullVoxPopuli 

Patch:
diff --git a/lib/rules/require-super-in-init.js b/lib/rules/require-super-in-init.js
index 4592dd5b..0c085ac2 100644
--- a/lib/rules/require-super-in-init.js
+++ b/lib/rules/require-super-in-init.js
@@ -101,7 +101,7 @@ module.exports = {
 
         const initProperty = ember
           .getModuleProperties(node)
-          .find(property => property.key.name === 'init');
+          .find(property => types.isProperty(property) && property.key.name === 'init');
 
         if (initProperty && types.isFunctionExpression(initProperty.value)) {
           const initPropertyBody = initProperty.value.body.body;


Test patch:
diff --git a/tests/lib/rules/require-super-in-init.js b/tests/lib/rules/require-super-in-init.js
index ff61ce00..542f3289 100644
--- a/tests/lib/rules/require-super-in-init.js
+++ b/tests/lib/rules/require-super-in-init.js
@@ -72,6 +72,10 @@ eslintTester.run('require-super-in-init', rule, {
     'export default Controller.extend();',
     'export default Mixin.extend();',
     'export default Service.extend();',
+    {
+      code: 'export default Service.extend({ ...spread })',
+      parserOptions: { ecmaVersion: 9, sourceType: 'module' },
+    },
     `export default Component({
         init() {
           this._super(...arguments);