Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: class-methods-use-this: fix option name #7224

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -31,7 +31,7 @@ v3.6.0 - September 23, 2016
* a876673 Update: no-implicit-coercion checks TemplateLiterals (fixes #7062) (#7121) (Kai Cataldo)
* 8db4f0c Chore: Enable `typeof` check for `no-undef` rule in eslint-config-eslint (#7103) (Teddy Katz)
* 7e8316f Docs: Update release process (#7127) (Nicholas C. Zakas)
* 22edd8a Update: `class-methods-use-this`: `exceptions` option (fixes #7085) (#7120) (Jordan Harband)
* 22edd8a Update: `class-methods-use-this`: `exceptMethods` option (fixes #7085) (#7120) (Jordan Harband)
* afd132a Fix: line-comment-position "above" string option now works (fixes #7100) (#7102) (Kevin Partington)
* 1738b2e Chore: fix name of internal-no-invalid-meta test file (#7142) (Vitor Balocco)
* ac0bb62 Docs: Fixes examples for allowTemplateLiterals (fixes #7115) (#7135) (Zoe Ingram)
Expand Down
10 changes: 5 additions & 5 deletions docs/rules/class-methods-use-this.md
Expand Up @@ -89,12 +89,12 @@ class A {
### Exceptions

```
"class-methods-use-this": [<enabled>, { "exceptions": [<...exceptions>] }]
"class-methods-use-this": [<enabled>, { "exceptMethods": [<...exceptions>] }]
```

The `exceptions` option allows you to pass an array of method names for which you would like to ignore warnings.
The `exceptMethods` option allows you to pass an array of method names for which you would like to ignore warnings.

Examples of **incorrect** code for this rule when used without exceptions:
Examples of **incorrect** code for this rule when used without exceptMethods:

```js
/*eslint class-methods-use-this: "error"*/
Expand All @@ -105,10 +105,10 @@ class A {
}
```

Examples of **correct** code for this rule when used with exceptions:
Examples of **correct** code for this rule when used with exceptMethods:

```js
/*eslint class-methods-use-this: ["error", { "exceptions": ["foo"] }] */
/*eslint class-methods-use-this: ["error", { "exceptMethods": ["foo"] }] */

class A {
foo() {
Expand Down