Skip to content

Commit 6e58318

Browse files
committed
style: Apply updated Prettier style
1 parent 61140fa commit 6e58318

File tree

2 files changed

+57
-49
lines changed

2 files changed

+57
-49
lines changed

src/compose/compose-collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function composeCollection(
7070
? anchor.offset > tagToken.offset
7171
? anchor
7272
: tagToken
73-
: anchor ?? tagToken
73+
: (anchor ?? tagToken)
7474
if (lastProp && (!nl || nl.offset < lastProp.offset)) {
7575
const message = 'Missing newline after block sequence props'
7676
onError(lastProp, 'MISSING_CHAR', message)

tests/cli.ts

Lines changed: 56 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -143,63 +143,71 @@ const skip = Number(major) < 20
143143
'Lexer',
144144
'hello: world',
145145
['lex', '--json', '--indent', '2'],
146-
['[\n "\\u0002",\n "\\u001f",\n "hello",\n ":",\n " ",\n "\\u001f",\n "world"\n]']
146+
[
147+
'[\n "\\u0002",\n "\\u001f",\n "hello",\n ":",\n " ",\n "\\u001f",\n "world"\n]'
148+
]
147149
)
148150
ok(
149151
'CST parser',
150152
'hello: world\n',
151153
['cst', '--json', '--indent', '2'],
152-
[JSON.stringify([
153-
{
154-
type: 'document',
155-
offset: 0,
156-
start: [],
157-
value: {
158-
type: 'block-map',
159-
offset: 0,
160-
indent: 0,
161-
items: [
162-
{
163-
start: [],
164-
key: {
165-
type: 'scalar',
166-
offset: 0,
167-
indent: 0,
168-
source: 'hello'
169-
},
170-
sep: [
154+
[
155+
JSON.stringify(
156+
[
157+
{
158+
type: 'document',
159+
offset: 0,
160+
start: [],
161+
value: {
162+
type: 'block-map',
163+
offset: 0,
164+
indent: 0,
165+
items: [
171166
{
172-
type: 'map-value-ind',
173-
offset: 5,
174-
indent: 0,
175-
source: ':'
176-
},
177-
{
178-
type: "space",
179-
offset: 6,
180-
indent: 0,
181-
source: ' '
182-
}
183-
],
184-
value: {
185-
type: 'scalar',
186-
offset: 7,
187-
indent: 0,
188-
source: 'world',
189-
end: [
190-
{
191-
type: 'newline',
192-
offset: 12,
167+
start: [],
168+
key: {
169+
type: 'scalar',
170+
offset: 0,
171+
indent: 0,
172+
source: 'hello'
173+
},
174+
sep: [
175+
{
176+
type: 'map-value-ind',
177+
offset: 5,
178+
indent: 0,
179+
source: ':'
180+
},
181+
{
182+
type: 'space',
183+
offset: 6,
184+
indent: 0,
185+
source: ' '
186+
}
187+
],
188+
value: {
189+
type: 'scalar',
190+
offset: 7,
193191
indent: 0,
194-
source: '\n'
192+
source: 'world',
193+
end: [
194+
{
195+
type: 'newline',
196+
offset: 12,
197+
indent: 0,
198+
source: '\n'
199+
}
200+
]
195201
}
196-
]
197-
}
202+
}
203+
]
198204
}
199-
]
200-
}
201-
}
202-
], null, 2)]
205+
}
206+
],
207+
null,
208+
2
209+
)
210+
]
203211
)
204212
})
205213
describe('--doc', () => {

0 commit comments

Comments
 (0)