Skip to content

Commit

Permalink
Docs: Fix typo and explain static func calls for class-methods-use-th…
Browse files Browse the repository at this point in the history
…is (#7421)
  • Loading branch information
scottohara authored and gyandeeps committed Oct 21, 2016
1 parent 85d7e24 commit e8159b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/rules/class-methods-use-this.md
Expand Up @@ -19,7 +19,7 @@ class A {
}
}

let aObj = new A();
let a = new A();
a.sayHi(); // => "hi"
```

Expand All @@ -43,6 +43,8 @@ class A {
A.sayHi(); // => "hi"
```

Also note in the above examples that the code calling the function on an *instance* of the class (`let a = new A(); a.sayHi();`) changes to calling it on the *class* itself (`A.sayHi();`).

## Rule Details

This rule is aimed to flag class methods that do not use `this`.
Expand Down

0 comments on commit e8159b4

Please sign in to comment.