Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: fix ESLint violation and lessen rule strictness (#6081)
  • Loading branch information
jackfranklin committed Jun 23, 2020
1 parent fdc6fda commit 70a900e
Show file tree
Hide file tree
Showing 37 changed files with 285 additions and 101 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Expand Up @@ -100,6 +100,11 @@ module.exports = {
"@typescript-eslint/semi": 2,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-use-before-define": 0,
// We have to use any on some types so the warning isn't valuable.
"@typescript-eslint/no-explicit-any": 0,
// We don't require explicit return types on basic functions or
// dummy functions in tests, for example
"@typescript-eslint/explicit-function-return-type": 0,
// We know it's bad and use it very sparingly but it's needed :(
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/array-type": [2, {
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.browsercontext.waitfortarget.md
Expand Up @@ -9,7 +9,7 @@ This searches for a target in this specific browser context.
<b>Signature:</b>

```typescript
waitForTarget(predicate: (x: Target) => boolean, options: {
waitForTarget(predicate: (x: Target) => boolean, options?: {
timeout?: number;
}): Promise<Target>;
```
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.browserfetcher.download.md
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
download(revision: string, progressCallback: (x: number, y: number) => void): Promise<BrowserFetcherRevisionInfo>;
download(revision: string, progressCallback?: (x: number, y: number) => void): Promise<BrowserFetcherRevisionInfo>;
```

## Parameters
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.coverage.startcsscoverage.md
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
startCSSCoverage(options: {
startCSSCoverage(options?: {
resetOnNavigation?: boolean;
}): Promise<void>;
```
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.coverage.startjscoverage.md
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
startJSCoverage(options: {
startJSCoverage(options?: {
resetOnNavigation?: boolean;
reportAnonymousScripts?: boolean;
}): Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.elementhandle.click.md
Expand Up @@ -9,7 +9,7 @@ This method scrolls element into view if needed, and then uses [Page.mouse](./pu
<b>Signature:</b>

```typescript
click(options: ClickOptions): Promise<void>;
click(options?: ClickOptions): Promise<void>;
```

## Parameters
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.frame.click.md
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
click(selector: string, options: {
click(selector: string, options?: {
delay?: number;
button?: MouseButtonInput;
clickCount?: number;
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.frame.waitfornavigation.md
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
waitForNavigation(options: {
waitForNavigation(options?: {
timeout?: number;
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
}): Promise<HTTPResponse | null>;
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.frame.waitforselector.md
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
waitForSelector(selector: string, options: WaitForSelectorOptions): Promise<ElementHandle | null>;
waitForSelector(selector: string, options?: WaitForSelectorOptions): Promise<ElementHandle | null>;
```

## Parameters
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.frame.waitforxpath.md
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
waitForXPath(xpath: string, options: WaitForSelectorOptions): Promise<ElementHandle | null>;
waitForXPath(xpath: string, options?: WaitForSelectorOptions): Promise<ElementHandle | null>;
```

## Parameters
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.keyboard.type.md
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
type(text: string, options: {
type(text: string, options?: {
delay?: number;
}): Promise<void>;
```
Expand Down
155 changes: 78 additions & 77 deletions new-docs/puppeteer.md
@@ -1,77 +1,78 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md)

## puppeteer package

## Classes

| Class | Description |
| --- | --- |
| [Accessibility](./puppeteer.accessibility.md) | The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access)<!-- -->. |
| [Browser](./puppeteer.browser.md) | A Browser is created when Puppeteer connects to a Chromium instance, either through [Puppeteer.launch()](./puppeteer.puppeteer.launch.md) or [Puppeteer.connect()](./puppeteer.puppeteer.connect.md)<!-- -->. |
| [BrowserContext](./puppeteer.browsercontext.md) | BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method [Browser.newPage](./puppeteer.browser.newpage.md) creates a page in the default browser context. |
| [BrowserFetcher](./puppeteer.browserfetcher.md) | |
| [CDPSession](./puppeteer.cdpsession.md) | The <code>CDPSession</code> instances are used to talk raw Chrome Devtools Protocol. |
| [Connection](./puppeteer.connection.md) | |
| [ConsoleMessage](./puppeteer.consolemessage.md) | ConsoleMessage objects are dispatched by page via the 'console' event. |
| [Coverage](./puppeteer.coverage.md) | |
| [Dialog](./puppeteer.dialog.md) | Dialog instances are dispatched by the [Page](./puppeteer.page.md) via the <code>dialog</code> event. |
| [ElementHandle](./puppeteer.elementhandle.md) | ElementHandle represents an in-page DOM element. |
| [EventEmitter](./puppeteer.eventemitter.md) | The EventEmitter class that many Puppeteer classes extend. |
| [ExecutionContext](./puppeteer.executioncontext.md) | |
| [FileChooser](./puppeteer.filechooser.md) | |
| [Frame](./puppeteer.frame.md) | |
| [FrameManager](./puppeteer.framemanager.md) | |
| [HTTPRequest](./puppeteer.httprequest.md) | |
| [HTTPResponse](./puppeteer.httpresponse.md) | |
| [JSHandle](./puppeteer.jshandle.md) | |
| [Keyboard](./puppeteer.keyboard.md) | |
| [Mouse](./puppeteer.mouse.md) | |
| [Page](./puppeteer.page.md) | Page provides methods to interact with a single tab or \[extension background page\](https://developer.chrome.com/extensions/background\_pages) in Chromium. One \[Browser\] instance might have multiple \[Page\] instances. |
| [Puppeteer](./puppeteer.puppeteer.md) | The main Puppeteer class |
| [SecurityDetails](./puppeteer.securitydetails.md) | The SecurityDetails class represents the security details of a response that was received over a secure connection. |
| [Target](./puppeteer.target.md) | |
| [TimeoutError](./puppeteer.timeouterror.md) | TimeoutError is emitted whenever certain operations are terminated due to timeout. |
| [Touchscreen](./puppeteer.touchscreen.md) | |
| [Tracing](./puppeteer.tracing.md) | |
| [WebWorker](./puppeteer.webworker.md) | The WebWorker class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)<!-- -->. |

## Enumerations

| Enumeration | Description |
| --- | --- |
| [PageEmittedEvents](./puppeteer.pageemittedevents.md) | All the events that a page instance may emit. |

## Interfaces

| Interface | Description |
| --- | --- |
| [BoundingBox](./puppeteer.boundingbox.md) | |
| [BoxModel](./puppeteer.boxmodel.md) | |
| [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) | |
| [ClickOptions](./puppeteer.clickoptions.md) | |
| [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) | |
| [KeyDefinition](./puppeteer.keydefinition.md) | Copyright 2017 Google Inc. All rights reserved.<!-- -->Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at<!-- -->http://www.apache.org/licenses/LICENSE-2.0<!-- -->Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
| [PressOptions](./puppeteer.pressoptions.md) | |
| [SerializedAXNode](./puppeteer.serializedaxnode.md) | Represents a Node and the properties of it that are relevant to Accessibility. |
| [SnapshotOptions](./puppeteer.snapshotoptions.md) | |
| [WaitForTargetOptions](./puppeteer.waitfortargetoptions.md) | |

## Variables

| Variable | Description |
| --- | --- |
| [EVALUATION\_SCRIPT\_URL](./puppeteer.evaluation_script_url.md) | |
| [keyDefinitions](./puppeteer.keydefinitions.md) | |
| [puppeteerErrors](./puppeteer.puppeteererrors.md) | |

## Type Aliases

| Type Alias | Description |
| --- | --- |
| [ConsoleMessageType](./puppeteer.consolemessagetype.md) | The supported types for console messages. |
| [KeyInput](./puppeteer.keyinput.md) | |
| [MouseButtonInput](./puppeteer.mousebuttoninput.md) | |
| [PuppeteerErrors](./puppeteer.puppeteererrors.md) | |

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md)

## puppeteer package

## Classes

| Class | Description |
| --- | --- |
| [Accessibility](./puppeteer.accessibility.md) | The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access)<!-- -->. |
| [Browser](./puppeteer.browser.md) | A Browser is created when Puppeteer connects to a Chromium instance, either through [Puppeteer.launch()](./puppeteer.puppeteer.launch.md) or [Puppeteer.connect()](./puppeteer.puppeteer.connect.md)<!-- -->. |
| [BrowserContext](./puppeteer.browsercontext.md) | BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method [Browser.newPage](./puppeteer.browser.newpage.md) creates a page in the default browser context. |
| [BrowserFetcher](./puppeteer.browserfetcher.md) | |
| [CDPSession](./puppeteer.cdpsession.md) | The <code>CDPSession</code> instances are used to talk raw Chrome Devtools Protocol. |
| [Connection](./puppeteer.connection.md) | |
| [ConsoleMessage](./puppeteer.consolemessage.md) | ConsoleMessage objects are dispatched by page via the 'console' event. |
| [Coverage](./puppeteer.coverage.md) | |
| [Dialog](./puppeteer.dialog.md) | Dialog instances are dispatched by the [Page](./puppeteer.page.md) via the <code>dialog</code> event. |
| [ElementHandle](./puppeteer.elementhandle.md) | ElementHandle represents an in-page DOM element. |
| [EventEmitter](./puppeteer.eventemitter.md) | The EventEmitter class that many Puppeteer classes extend. |
| [ExecutionContext](./puppeteer.executioncontext.md) | |
| [FileChooser](./puppeteer.filechooser.md) | |
| [Frame](./puppeteer.frame.md) | |
| [FrameManager](./puppeteer.framemanager.md) | |
| [HTTPRequest](./puppeteer.httprequest.md) | |
| [HTTPResponse](./puppeteer.httpresponse.md) | |
| [JSHandle](./puppeteer.jshandle.md) | |
| [Keyboard](./puppeteer.keyboard.md) | |
| [Mouse](./puppeteer.mouse.md) | |
| [Page](./puppeteer.page.md) | Page provides methods to interact with a single tab or \[extension background page\](https://developer.chrome.com/extensions/background\_pages) in Chromium. One \[Browser\] instance might have multiple \[Page\] instances. |
| [Puppeteer](./puppeteer.puppeteer.md) | The main Puppeteer class |
| [SecurityDetails](./puppeteer.securitydetails.md) | The SecurityDetails class represents the security details of a response that was received over a secure connection. |
| [Target](./puppeteer.target.md) | |
| [TimeoutError](./puppeteer.timeouterror.md) | TimeoutError is emitted whenever certain operations are terminated due to timeout. |
| [Touchscreen](./puppeteer.touchscreen.md) | |
| [Tracing](./puppeteer.tracing.md) | |
| [WebWorker](./puppeteer.webworker.md) | The WebWorker class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)<!-- -->. |

## Enumerations

| Enumeration | Description |
| --- | --- |
| [PageEmittedEvents](./puppeteer.pageemittedevents.md) | All the events that a page instance may emit. |

## Interfaces

| Interface | Description |
| --- | --- |
| [BoundingBox](./puppeteer.boundingbox.md) | |
| [BoxModel](./puppeteer.boxmodel.md) | |
| [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) | |
| [ClickOptions](./puppeteer.clickoptions.md) | |
| [ConsoleMessageLocation](./puppeteer.consolemessagelocation.md) | |
| [KeyDefinition](./puppeteer.keydefinition.md) | Copyright 2017 Google Inc. All rights reserved.<!-- -->Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at<!-- -->http://www.apache.org/licenses/LICENSE-2.0<!-- -->Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
| [Metrics](./puppeteer.metrics.md) | |
| [PressOptions](./puppeteer.pressoptions.md) | |
| [SerializedAXNode](./puppeteer.serializedaxnode.md) | Represents a Node and the properties of it that are relevant to Accessibility. |
| [SnapshotOptions](./puppeteer.snapshotoptions.md) | |
| [WaitForTargetOptions](./puppeteer.waitfortargetoptions.md) | |

## Variables

| Variable | Description |
| --- | --- |
| [EVALUATION\_SCRIPT\_URL](./puppeteer.evaluation_script_url.md) | |
| [keyDefinitions](./puppeteer.keydefinitions.md) | |
| [puppeteerErrors](./puppeteer.puppeteererrors.md) | |

## Type Aliases

| Type Alias | Description |
| --- | --- |
| [ConsoleMessageType](./puppeteer.consolemessagetype.md) | The supported types for console messages. |
| [KeyInput](./puppeteer.keyinput.md) | |
| [MouseButtonInput](./puppeteer.mousebuttoninput.md) | |
| [PuppeteerErrors](./puppeteer.puppeteererrors.md) | |

11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.documents.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [Documents](./puppeteer.metrics.documents.md)

## Metrics.Documents property

<b>Signature:</b>

```typescript
Documents?: number;
```
11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.frames.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [Frames](./puppeteer.metrics.frames.md)

## Metrics.Frames property

<b>Signature:</b>

```typescript
Frames?: number;
```
11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.jseventlisteners.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [JSEventListeners](./puppeteer.metrics.jseventlisteners.md)

## Metrics.JSEventListeners property

<b>Signature:</b>

```typescript
JSEventListeners?: number;
```
11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.jsheaptotalsize.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [JSHeapTotalSize](./puppeteer.metrics.jsheaptotalsize.md)

## Metrics.JSHeapTotalSize property

<b>Signature:</b>

```typescript
JSHeapTotalSize?: number;
```
11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.jsheapusedsize.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [JSHeapUsedSize](./puppeteer.metrics.jsheapusedsize.md)

## Metrics.JSHeapUsedSize property

<b>Signature:</b>

```typescript
JSHeapUsedSize?: number;
```
11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.layoutcount.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [LayoutCount](./puppeteer.metrics.layoutcount.md)

## Metrics.LayoutCount property

<b>Signature:</b>

```typescript
LayoutCount?: number;
```
11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.layoutduration.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [LayoutDuration](./puppeteer.metrics.layoutduration.md)

## Metrics.LayoutDuration property

<b>Signature:</b>

```typescript
LayoutDuration?: number;
```
30 changes: 30 additions & 0 deletions new-docs/puppeteer.metrics.md
@@ -0,0 +1,30 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md)

## Metrics interface

<b>Signature:</b>

```typescript
export interface Metrics
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [Documents](./puppeteer.metrics.documents.md) | number | |
| [Frames](./puppeteer.metrics.frames.md) | number | |
| [JSEventListeners](./puppeteer.metrics.jseventlisteners.md) | number | |
| [JSHeapTotalSize](./puppeteer.metrics.jsheaptotalsize.md) | number | |
| [JSHeapUsedSize](./puppeteer.metrics.jsheapusedsize.md) | number | |
| [LayoutCount](./puppeteer.metrics.layoutcount.md) | number | |
| [LayoutDuration](./puppeteer.metrics.layoutduration.md) | number | |
| [Nodes](./puppeteer.metrics.nodes.md) | number | |
| [RecalcStyleCount](./puppeteer.metrics.recalcstylecount.md) | number | |
| [RecalcStyleDuration](./puppeteer.metrics.recalcstyleduration.md) | number | |
| [ScriptDuration](./puppeteer.metrics.scriptduration.md) | number | |
| [TaskDuration](./puppeteer.metrics.taskduration.md) | number | |
| [Timestamp](./puppeteer.metrics.timestamp.md) | number | |

11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.nodes.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [Nodes](./puppeteer.metrics.nodes.md)

## Metrics.Nodes property

<b>Signature:</b>

```typescript
Nodes?: number;
```
11 changes: 11 additions & 0 deletions new-docs/puppeteer.metrics.recalcstylecount.md
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Metrics](./puppeteer.metrics.md) &gt; [RecalcStyleCount](./puppeteer.metrics.recalcstylecount.md)

## Metrics.RecalcStyleCount property

<b>Signature:</b>

```typescript
RecalcStyleCount?: number;
```

0 comments on commit 70a900e

Please sign in to comment.