From 017429eef1f1fbb83bb2df4817845a233314ee88 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 2 Oct 2017 14:28:51 -0700 Subject: [PATCH] chore(doclint): exclude constructors by default (#938) Our API does not expose any classes; thus all the constructors should be excluded from the API. --- utils/doclint/check_public_api/index.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/utils/doclint/check_public_api/index.js b/utils/doclint/check_public_api/index.js index 3eebc982a93a5..c55c95075da3b 100644 --- a/utils/doclint/check_public_api/index.js +++ b/utils/doclint/check_public_api/index.js @@ -35,22 +35,8 @@ const EXCLUDE_CLASSES = new Set([ ]); const EXCLUDE_METHODS = new Set([ - 'Body.constructor', - 'Browser.constructor', - 'ConsoleMessage.constructor', - 'Dialog.constructor', - 'ElementHandle.constructor', - 'Frame.constructor', - 'Headers.constructor', 'Headers.fromPayload', - 'Keyboard.constructor', - 'Mouse.constructor', - 'Touchscreen.constructor', - 'Tracing.constructor', - 'Page.constructor', 'Page.create', - 'Request.constructor', - 'Response.constructor', ]); /** @@ -145,6 +131,9 @@ function filterJSDocumentation(jsDocumentation) { const members = cls.membersArray.filter(member => { if (member.name.startsWith('_')) return false; + // Exclude all constructors by default. + if (member.name === 'constructor' && member.type === 'method') + return false; return !EXCLUDE_METHODS.has(`${cls.name}.${member.name}`); }); classes.push(new Documentation.Class(cls.name, members));