From d63c9788eaf7a11aee2f9e1b0b321c7bc3228091 Mon Sep 17 00:00:00 2001 From: Chiawen Chen Date: Tue, 30 Jul 2019 19:11:03 +0800 Subject: [PATCH] Docs: add a case to func-names --- 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() { // ... }())