Moar VSCode autofixes

This commit is contained in:
Alexander Cerutti
2020-09-05 23:52:50 +02:00
parent 10dad6c1af
commit a3ae92ea7f
4 changed files with 9 additions and 9 deletions

View File

@@ -51,7 +51,7 @@ export class AbstractModel {
constructor(options: AbstractModelOptions) { constructor(options: AbstractModelOptions) {
this[abmModel] = options.bundle; this[abmModel] = options.bundle;
this[abmCertificates] = options.certificates, this[abmCertificates] = options.certificates;
this[abmOverrides] = options.overrides this[abmOverrides] = options.overrides
} }

View File

@@ -36,7 +36,7 @@ export async function createPass(
} }
if (additionalBuffers) { if (additionalBuffers) {
const [ additionalL10n, additionalBundle ] = splitBufferBundle(additionalBuffers); const [additionalL10n, additionalBundle] = splitBufferBundle(additionalBuffers);
Object.assign(options.bundle["l10nBundle"], additionalL10n); Object.assign(options.bundle["l10nBundle"], additionalL10n);
Object.assign(options.bundle["bundle"], additionalBundle); Object.assign(options.bundle["bundle"], additionalBundle);
} }
@@ -56,7 +56,7 @@ export async function createPass(
]); ]);
if (additionalBuffers) { if (additionalBuffers) {
const [ additionalL10n, additionalBundle ] = splitBufferBundle(additionalBuffers); const [additionalL10n, additionalBundle] = splitBufferBundle(additionalBuffers);
Object.assign(bundle["l10nBundle"], additionalL10n); Object.assign(bundle["l10nBundle"], additionalL10n);
Object.assign(bundle["bundle"], additionalBundle); Object.assign(bundle["bundle"], additionalBundle);
} }

View File

@@ -48,7 +48,7 @@ export default class FieldsArray extends Array {
*/ */
pop(): schema.Field { pop(): schema.Field {
const element: schema.Field = Array.prototype.pop.call(this); const element: schema.Field = Array.prototype.pop.call(this);
this[poolSymbol].delete(element.key); this[poolSymbol].delete(element.key);
return element; return element;
} }
@@ -59,7 +59,7 @@ export default class FieldsArray extends Array {
*/ */
splice(start: number, deleteCount: number, ...items: schema.Field[]): schema.Field[] { splice(start: number, deleteCount: number, ...items: schema.Field[]): schema.Field[] {
const removeList = this.slice(start, deleteCount+start); const removeList = this.slice(start, deleteCount + start);
removeList.forEach(item => this[poolSymbol].delete(item.key)); removeList.forEach(item => this[poolSymbol].delete(item.key));
return Array.prototype.splice.call(this, start, deleteCount, items); return Array.prototype.splice.call(this, start, deleteCount, items);

View File

@@ -92,9 +92,9 @@ export function generateStringFile(lang: { [index: string]: string }): Buffer {
type PartitionedBundleElements = [PartitionedBundle["l10nBundle"], PartitionedBundle["bundle"]]; type PartitionedBundleElements = [PartitionedBundle["l10nBundle"], PartitionedBundle["bundle"]];
export function splitBufferBundle(origin: any): PartitionedBundleElements { export function splitBufferBundle(origin: any): PartitionedBundleElements {
return Object.keys(origin).reduce<PartitionedBundleElements>(([ l10n, bundle ], current) => { return Object.keys(origin).reduce<PartitionedBundleElements>(([l10n, bundle], current) => {
if (!current.includes(".lproj")) { if (!current.includes(".lproj")) {
return [ l10n, { ...bundle, [current]: origin[current] }]; return [l10n, { ...bundle, [current]: origin[current] }];
} }
const pathComponents = current.split(sep); const pathComponents = current.split(sep);
@@ -103,8 +103,8 @@ export function splitBufferBundle(origin: any): PartitionedBundleElements {
(l10n[lang] || (l10n[lang] = {}))[file] = origin[current]; (l10n[lang] || (l10n[lang] = {}))[file] = origin[current];
return [ l10n, bundle ]; return [l10n, bundle];
}, [{},{}]); }, [{}, {}]);
} }
type StringSearchMode = "includes" | "startsWith" | "endsWith"; type StringSearchMode = "includes" | "startsWith" | "endsWith";