Skip to content

Commit 8e45774

Browse files
committed
Clean up text, scope initOverride
1 parent a9b956c commit 8e45774

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

guides/rules/no-broken-super-chain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Rule name: `no-broken-super-chain`
44

5-
If you are overriding the `init` lifecycle hook in Ember modules like Component, Mixin, etc. it is necessary that you include a call to `_super`
5+
If you are overriding the `init` lifecycle hook in Ember classes like Component, Mixin, etc. it is necessary that you include a call to `_super`.
66

77
```javascript
88
// GOOD

lib/rules/no-broken-super-chain.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
const MESSAGES = {
7-
noSuper: '\'this._super(...arguments)\' must be called in init in this Ember modules',
7+
noSuper: '\'this._super(...arguments)\' must be called in init()',
88
noThisBeforeSuper: 'Must call \'this._super(...arguments)\' before accessing `this`',
99
tooManySupers: 'Only call `this._super(...arguments)` once per init()'
1010
};
@@ -18,8 +18,6 @@ const EMBER_MODULES_WITH_SUPER_CHAIN = {
1818
View: true
1919
};
2020

21-
let initOverride = null;
22-
2321
/**
2422
* Determines if this is an init method in an extension of Ember[EMBER_MODULES_WITH_SUPER_CHAIN.*]
2523
* @param {Node} node
@@ -51,6 +49,8 @@ module.exports = {
5149
messages: MESSAGES
5250
},
5351
create(context) {
52+
let initOverride = null;
53+
5454
return {
5555
onCodePathStart(codePath, node) {
5656
if (isInit(node)) {

0 commit comments

Comments
 (0)