Enable max-statements-per-line lint rule (#45475)

* Enable the rule

* Fix all the violations
This commit is contained in:
Ryan Cavanaugh
2021-08-16 13:53:51 -07:00
committed by GitHub
parent 339ad92b98
commit e00b5ecd40
37 changed files with 215 additions and 109 deletions

View File

@@ -105,9 +105,9 @@ function createKey(name: string, code: number): string {
function convertPropertyName(origName: string): string {
let result = origName.split("").map(char => {
if (char === "*") { return "_Asterisk"; }
if (char === "/") { return "_Slash"; }
if (char === ":") { return "_Colon"; }
if (char === "*") return "_Asterisk";
if (char === "/") return "_Slash";
if (char === ":") return "_Colon";
return /\w/.test(char) ? char : "_";
}).join("");

View File

@@ -102,5 +102,9 @@ async function exec(path: string, args: string[] = []) {
childProcess.execSync(cmdLine);
}
process.on("unhandledRejection", err => { throw err; });
produceLKG().then(() => console.log("Done"), err => { throw err; });
process.on("unhandledRejection", err => {
throw err;
});
produceLKG().then(() => console.log("Done"), err => {
throw err;
});