Update the brace format from 1tbs to stroustrup
This commit is contained in:
parent
1c7308e188
commit
3dd3139281
13 changed files with 31 additions and 16 deletions
|
|
@ -75,7 +75,7 @@ export default [
|
|||
"@stylistic/eol-last": `warn`,
|
||||
"@stylistic/operator-linebreak": [`warn`, `before`],
|
||||
"@stylistic/indent": [`warn`, `tab`],
|
||||
"@stylistic/brace-style": [`warn`, `1tbs`, { "allowSingleLine": true }],
|
||||
"@stylistic/brace-style": [`warn`, `stroustrup`, { "allowSingleLine": true }],
|
||||
"@stylistic/quotes": [`warn`, `backtick`, { "avoidEscape": true }],
|
||||
"@stylistic/comma-dangle": [`warn`, { arrays: `always-multiline`, objects: `always-multiline`, imports: `always-multiline`, exports: `always-multiline`, functions: `always-multiline` }],
|
||||
"@stylistic/comma-style": [`warn`, `last`],
|
||||
|
|
|
|||
|
|
@ -115,7 +115,8 @@ export class CraftCardV1 extends GenericAppMixin(HandlebarsApplicationMixin(Acto
|
|||
const length = crafts.length;
|
||||
if (length >= limit) {
|
||||
crafts = crafts.slice(0, limit);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
crafts = crafts
|
||||
.concat(Array(limit - length).fill(null))
|
||||
.slice(0, limit);
|
||||
|
|
|
|||
|
|
@ -194,7 +194,8 @@ export class SkillsCardV1 extends GenericAppMixin(HandlebarsApplicationMixin(Act
|
|||
const length = ctx.skills[ability].length;
|
||||
if (length >= limit) {
|
||||
ctx.skills[ability] = ctx.skills[ability].slice(0, limit);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ctx.skills[ability] = ctx.skills[ability]
|
||||
.concat(Array(limit - length).fill(null))
|
||||
.slice(0, limit);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,8 @@ export class DelveDiceHUD extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
const existing = document.getElementById(element.id);
|
||||
if (existing) {
|
||||
existing.replaceWith(element);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
const parent = document.getElementById(`ui-top`);
|
||||
parent.prepend(element);
|
||||
};
|
||||
|
|
@ -292,7 +293,8 @@ export class DelveDiceHUD extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
if (delta === 0 || !shouldUpdateSands) { return };
|
||||
if (game.user.isActiveGM) {
|
||||
ui.delveDice.sandsOfFateDelta(delta);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
game.socket.emit(`system.ripcrypt`, {
|
||||
event: `updateSands`,
|
||||
payload: { delta },
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ export function StyledShadowElement(Base) {
|
|||
const stylePath = this.constructor._stylePath;
|
||||
if (this.constructor._styles.has(stylePath)) {
|
||||
this._style.innerHTML = this.constructor._styles.get(stylePath);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
fetch(`./systems/${game.system.id}/templates/${stylePath}`)
|
||||
.then(r => r.text())
|
||||
.then(t => {
|
||||
|
|
|
|||
|
|
@ -42,9 +42,11 @@ export function toBoolean(val) {
|
|||
export function documentSorter(a, b) {
|
||||
if (!a && !b) {
|
||||
return 0;
|
||||
} else if (!a) {
|
||||
}
|
||||
else if (!a) {
|
||||
return 1;
|
||||
} else if (!b) {
|
||||
}
|
||||
else if (!b) {
|
||||
return -1;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,8 @@ export class WeaponData extends CommonItemData {
|
|||
value: this.range.long,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
fields.push({
|
||||
id: `short-range`,
|
||||
type: `integer`,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ export class CryptDie extends Die {
|
|||
if (almostCrypted) {
|
||||
this.ripCryptState = `crypted`;
|
||||
break;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
almostCrypted = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ export class RipCryptCombat extends Combat {
|
|||
|
||||
if (groups.has(groupKey)) {
|
||||
groups.get(groupKey).push(combatant);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
groups.set(groupKey, [combatant]);
|
||||
};
|
||||
};
|
||||
|
|
@ -129,7 +130,8 @@ export class RipCryptCombat extends Combat {
|
|||
const currentToken = this.combatant?.token?._object;
|
||||
if (!tokenGroup && currentToken) {
|
||||
currentToken.renderFlags.set({refreshTurnMarker: true});
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
const group = this.customGroups.get(tokenGroup) ?? [];
|
||||
for (const combatant of group) {
|
||||
combatant.token?._object?.renderFlags.set({ refreshTurnMarker: true });
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ export class RipCryptCombatant extends Combatant {
|
|||
const disposition = this.disposition;
|
||||
if (disposition === `unknown`) {
|
||||
total += 0.25;
|
||||
} else if (whoFirst !== disposition) {
|
||||
}
|
||||
else if (whoFirst !== disposition) {
|
||||
total += 0.5;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ export class RipCryptToken extends Token {
|
|||
};
|
||||
canvas.tokens.turnMarkers.add(this);
|
||||
this.turnMarker.draw();
|
||||
} else if (this.turnMarker) {
|
||||
}
|
||||
else if (this.turnMarker) {
|
||||
canvas.tokens.turnMarkers.delete(this);
|
||||
this.turnMarker.destroy();
|
||||
this.turnMarker = null;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ Hooks.once(`ready`, () => {
|
|||
try {
|
||||
Logger.debug(`Switching sidebar tab to:`, defaultTab);
|
||||
ui.sidebar.changeTab(defaultTab, `primary`);
|
||||
} catch {
|
||||
}
|
||||
catch {
|
||||
Logger.error(`Failed to change to sidebar tab:`, defaultTab);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ export function updateSands(payload) {
|
|||
`sandsOfFate`,
|
||||
sands,
|
||||
);
|
||||
} else if (delta != null) {
|
||||
}
|
||||
else if (delta != null) {
|
||||
ui.delveDice.sandsOfFateDelta(delta);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue