From d90183ff6757cff854f4ca4d25b835143dfb4b21 Mon Sep 17 00:00:00 2001 From: Chiawen Chen Date: Wed, 31 Jul 2019 21:12:26 +0800 Subject: [PATCH] Docs: add a case to func-names (#12038) --- docs/rules/func-names.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/rules/func-names.md b/docs/rules/func-names.md index cd699400698..b051d9b9bef 100644 --- a/docs/rules/func-names.md +++ b/docs/rules/func-names.md @@ -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() { // ... }()) @@ -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() { // ... }()) @@ -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() { // ... }())