mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
lint: prevent object string concatenation (#23172)
This commit is contained in:
parent
bd33e5f8c0
commit
bd090e67df
9
packages/.eslintrc-with-ts-config.js
Normal file
9
packages/.eslintrc-with-ts-config.js
Normal file
@ -0,0 +1,9 @@
|
||||
module.exports = {
|
||||
extends: ".eslintrc.js",
|
||||
rules: {
|
||||
"@typescript-eslint/no-base-to-string": "error",
|
||||
},
|
||||
parserOptions: {
|
||||
project: "./tsconfig.json"
|
||||
},
|
||||
};
|
@ -10,7 +10,7 @@ module.exports = {
|
||||
* Severity: 2 == error, 1 == warning, 0 == off.
|
||||
*/
|
||||
"rules": {
|
||||
"no-console": 2,
|
||||
"no-debugger": 2
|
||||
"no-console": 2,
|
||||
"no-debugger": 2
|
||||
}
|
||||
};
|
||||
|
3
packages/playwright-core/.eslintrc.js
Normal file
3
packages/playwright-core/.eslintrc.js
Normal file
@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
extends: "../.eslintrc-with-ts-config.js",
|
||||
};
|
@ -152,7 +152,7 @@ export class VideoRecorder {
|
||||
private async _sendFrame(frame: Buffer) {
|
||||
return new Promise(f => this._process!.stdin!.write(frame, f)).then(error => {
|
||||
if (error)
|
||||
this._progress.log(`ffmpeg failed to write: ${error}`);
|
||||
this._progress.log(`ffmpeg failed to write: ${String(error)}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ export abstract class APIRequestContext extends SdkObject {
|
||||
const emptyStreamTransform = new SafeEmptyStreamTransform(notifyBodyFinished);
|
||||
body = pipeline(response, emptyStreamTransform, transform, e => {
|
||||
if (e)
|
||||
reject(new Error(`failed to decompress '${encoding}' encoding: ${e}`));
|
||||
reject(new Error(`failed to decompress '${encoding}' encoding: ${e.message}`));
|
||||
});
|
||||
body.on('error', e => reject(new Error(`failed to decompress '${encoding}' encoding: ${e}`)));
|
||||
} else {
|
||||
|
3
packages/playwright-ct-core/.eslintrc.js
Normal file
3
packages/playwright-ct-core/.eslintrc.js
Normal file
@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
extends: "../.eslintrc-with-ts-config.js",
|
||||
};
|
3
packages/playwright-test/.eslintrc.js
Normal file
3
packages/playwright-test/.eslintrc.js
Normal file
@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
extends: "../.eslintrc-with-ts-config.js",
|
||||
};
|
Loading…
Reference in New Issue
Block a user