Skip to content

Commit a017467

Browse files
author
Jonas Jonsson
committed
fix: formatting
1 parent caf40ec commit a017467

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

mf2/fluent/src/fluent-to-message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function asExpression(exp: Fluent.Expression): MF.Expression {
129129
throw new Error(`More than one positional argument is not supported.`);
130130
}
131131
if (named.length > 0) {
132-
annotation.options = {}
132+
annotation.options = {};
133133
for (const { name, value } of named) {
134134
const quoted = value.type !== 'NumberLiteral';
135135
const litValue = quoted ? value.parse().value : value.value;

mf2/icu-messageformat-1/src/validate.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export function mf1Validate(
1818
type: 'unknown-function' | 'unsupported-operation',
1919
expr: MF.Expression
2020
) => void = (type, expr) => {
21-
const argTypeAttr = expr.attributes && Object.hasOwn(expr.attributes, 'mf1:argType') ? expr.attributes['mf1:argType'] : undefined;
21+
const argTypeAttr =
22+
expr.attributes && Object.hasOwn(expr.attributes, 'mf1:argType')
23+
? expr.attributes['mf1:argType']
24+
: undefined;
2225
const argType =
2326
argTypeAttr && argTypeAttr !== true
2427
? argTypeAttr.value

mf2/messageformat/src/resolve/function-context.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export class MessageFunctionContext {
1414
this.#source = source;
1515

1616
this.dir = undefined;
17-
const dirOpt = options && Object.hasOwn(options, 'u:dir') ? options['u:dir'] : undefined;
17+
const dirOpt =
18+
options && Object.hasOwn(options, 'u:dir') ? options['u:dir'] : undefined;
1819
if (dirOpt) {
1920
const dir = String(resolveValue(ctx, dirOpt));
2021
if (dir === 'ltr' || dir === 'rtl' || dir === 'auto') {
@@ -29,7 +30,8 @@ export class MessageFunctionContext {
2930
}
3031
}
3132

32-
const idOpt = options && Object.hasOwn(options, 'u:id') ? options['u:id'] : undefined;
33+
const idOpt =
34+
options && Object.hasOwn(options, 'u:id') ? options['u:id'] : undefined;
3335
this.id = idOpt ? String(resolveValue(ctx, idOpt)) : undefined;
3436

3537
if (options) {

mf2/xliff/src/xliff2mf.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ function resolveOptions(
452452
const options: MF.Options = {};
453453
for (const el of optEls) {
454454
const name = el.attributes.name;
455-
if (Object.hasOwn(options, name)) throw new Error(`Duplicate option name: ${name}`);
455+
if (Object.hasOwn(options, name))
456+
throw new Error(`Duplicate option name: ${name}`);
456457
options[name] = resolveValue(el.elements.find(el => el.type === 'element'));
457458
}
458459
return options;

0 commit comments

Comments
 (0)