File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
messageformat/src/resolve Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments