Apply 'variable-name' tslint rule (#19743)

This commit is contained in:
Andy
2017-11-06 09:23:47 -08:00
committed by GitHub
parent 8d5b0529b2
commit 0a7b7e07ee
36 changed files with 349 additions and 331 deletions

View File

@@ -87,9 +87,9 @@ function main(): void {
const out: any = {};
for (const item of o.LCX.Item[0].Item[0].Item) {
let ItemId = item.$.ItemId;
let Val = item.Str[0].Tgt ? item.Str[0].Tgt[0].Val[0] : item.Str[0].Val[0];
let val = item.Str[0].Tgt ? item.Str[0].Tgt[0].Val[0] : item.Str[0].Val[0];
if (typeof ItemId !== "string" || typeof Val !== "string") {
if (typeof ItemId !== "string" || typeof val !== "string") {
console.error("Unexpected XML file structure");
process.exit(1);
}
@@ -98,8 +98,8 @@ function main(): void {
ItemId = ItemId.slice(1); // remove leading semicolon
}
Val = Val.replace(/]5D;/, "]"); // unescape `]`
out[ItemId] = Val;
val = val.replace(/]5D;/, "]"); // unescape `]`
out[ItemId] = val;
}
return JSON.stringify(out, undefined, 2);
}