mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Enable max-statements-per-line lint rule (#45475)
* Enable the rule * Fix all the violations
This commit is contained in:
@@ -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("");
|
||||
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user