Skip to content

Commit

Permalink
Docs: add a case to func-names (#12038)
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot authored and aladdin-add committed Jul 31, 2019
1 parent 8a5b62d commit d90183f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/rules/func-names.md
Expand Up @@ -38,6 +38,10 @@ Examples of **incorrect** code for this rule with the default `"always"` option:

Foo.prototype.bar = function() {};

const cat = {
meow: function() {}
}

(function() {
// ...
}())
Expand All @@ -50,6 +54,10 @@ Examples of **correct** code for this rule with the default `"always"` option:

Foo.prototype.bar = function bar() {};

const cat = {
meow() {}
}

(function bar() {
// ...
}())
Expand Down Expand Up @@ -78,6 +86,10 @@ Examples of **correct** code for this rule with the `"as-needed"` option:

var bar = function() {};

const cat = {
meow: function() {}
}

(function bar() {
// ...
}())
Expand Down

0 comments on commit d90183f

Please sign in to comment.