chore(eslint): add rule no-unused-expressions (#4848)
This commit is contained in:
parent
d08f8487c4
commit
6697dadca2
|
|
@ -65,6 +65,7 @@ module.exports = {
|
|||
"radix": 2,
|
||||
"valid-typeof": 2,
|
||||
"no-implicit-globals": [2],
|
||||
"no-unused-expressions": [2, { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true}],
|
||||
|
||||
// es2015 features
|
||||
"require-yield": 2,
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ class FFAXNode implements accessibility.AXNode {
|
|||
this._expanded = !!payload.expanded;
|
||||
this._name = this._payload.name;
|
||||
this._role = this._payload.role;
|
||||
this._cachedHasFocusableChild;
|
||||
}
|
||||
|
||||
_isPlainTextField(): boolean {
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ export class PipeTransport implements ConnectionTransport {
|
|||
this._closed = true;
|
||||
if (this.onclose)
|
||||
this.onclose.call(null);
|
||||
}),
|
||||
pipeRead.on('error', e => debugLogger.log('error', e)),
|
||||
pipeWrite.on('error', e => debugLogger.log('error', e)),
|
||||
});
|
||||
pipeRead.on('error', e => debugLogger.log('error', e));
|
||||
pipeWrite.on('error', e => debugLogger.log('error', e));
|
||||
this.onmessage = undefined;
|
||||
this.onclose = undefined;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ class HarContextTracer {
|
|||
const harEntry = this._entries.get(response.request())!;
|
||||
// Rewrite provisional headers with actual
|
||||
const request = response.request();
|
||||
harEntry.request.headers = request.headers().map(header => ({ name: header.name, value: header.value })),
|
||||
harEntry.request.headers = request.headers().map(header => ({ name: header.name, value: header.value }));
|
||||
harEntry.request.cookies = cookiesForHar(request.headerValue('cookie'), ';');
|
||||
harEntry.request.postData = postDataForHar(request) || undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ describe('cli codegen', (test, { browserName, headful }) => {
|
|||
expect(selector).toBe('input[name="name"]');
|
||||
|
||||
const messages: any[] = [];
|
||||
page.on('console', message => messages.push(message)),
|
||||
page.on('console', message => messages.push(message));
|
||||
await Promise.all([
|
||||
recorder.waitForActionPerformed(),
|
||||
recorder.waitForOutput('press'),
|
||||
|
|
@ -161,7 +161,7 @@ describe('cli codegen', (test, { browserName, headful }) => {
|
|||
const messages: any[] = [];
|
||||
page.on('console', message => {
|
||||
messages.push(message);
|
||||
}),
|
||||
});
|
||||
await Promise.all([
|
||||
recorder.waitForActionPerformed(),
|
||||
recorder.waitForOutput('press'),
|
||||
|
|
@ -182,7 +182,7 @@ describe('cli codegen', (test, { browserName, headful }) => {
|
|||
const messages: any[] = [];
|
||||
page.on('console', message => {
|
||||
messages.push(message);
|
||||
}),
|
||||
});
|
||||
await Promise.all([
|
||||
recorder.waitForActionPerformed(),
|
||||
recorder.waitForOutput('press'),
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ it('should not throw "Invalid Interception Id" if the request was cancelled', as
|
|||
await page.setContent('<iframe></iframe>');
|
||||
let route = null;
|
||||
await page.route('**/*', async r => route = r);
|
||||
page.$eval('iframe', (frame, url) => frame.src = url, server.EMPTY_PAGE),
|
||||
page.$eval('iframe', (frame, url) => frame.src = url, server.EMPTY_PAGE);
|
||||
// Wait for request interception.
|
||||
await page.waitForEvent('request');
|
||||
// Delete frame to cause request to be canceled.
|
||||
|
|
|
|||
Loading…
Reference in a new issue