diff --git a/.eslintrc b/.eslintrc index 3e66ec82df3..87c93f7030b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -110,7 +110,7 @@ "no-unused-expressions": "off", "no-unused-labels": "error", "no-var": "off", - "object-shorthand": "off", + "object-shorthand": "error", "one-var": "off", "prefer-const": "off", "prefer-object-spread": "error", diff --git a/scripts/buildProtocol.ts b/scripts/buildProtocol.ts index 08dd56b5657..b25574ef379 100644 --- a/scripts/buildProtocol.ts +++ b/scripts/buildProtocol.ts @@ -139,9 +139,9 @@ function writeProtocolFile(outputFile: string, protocolTs: string, typeScriptSer if (protocolDts === undefined) { const diagHost: ts.FormatDiagnosticsHost = { - getCanonicalFileName: function (f) { return f; }, - getCurrentDirectory: function() { return '.'; }, - getNewLine: function() { return "\r\n"; } + getCanonicalFileName(f) { return f; }, + getCurrentDirectory() { return '.'; }, + getNewLine() { return "\r\n"; } }; const diags = emitResult.diagnostics.map(d => ts.formatDiagnostic(d, diagHost)).join("\r\n"); throw new Error(`Declaration file for protocol.ts is not generated:\r\n${diags}`); diff --git a/scripts/word2md.ts b/scripts/word2md.ts index f602c700ff9..e9a41dfa39a 100644 --- a/scripts/word2md.ts +++ b/scripts/word2md.ts @@ -141,7 +141,7 @@ var sys = (function () { args[i] = WScript.Arguments.Item(i); } return { - args: args, + args, createObject: (typeName: string) => new ActiveXObject(typeName), write(s: string): void { WScript.StdOut.Write(s);