lint: prevent object string concatenation (#23172)

This commit is contained in:
Pavel Feldman 2023-05-19 15:17:43 -07:00 committed by GitHub
parent bd33e5f8c0
commit bd090e67df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 4 deletions

View File

@ -0,0 +1,9 @@
module.exports = {
extends: ".eslintrc.js",
rules: {
"@typescript-eslint/no-base-to-string": "error",
},
parserOptions: {
project: "./tsconfig.json"
},
};

View File

@ -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
}
};

View File

@ -0,0 +1,3 @@
module.exports = {
extends: "../.eslintrc-with-ts-config.js",
};

View File

@ -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)}`);
});
}

View File

@ -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 {

View File

@ -0,0 +1,3 @@
module.exports = {
extends: "../.eslintrc-with-ts-config.js",
};

View File

@ -0,0 +1,3 @@
module.exports = {
extends: "../.eslintrc-with-ts-config.js",
};