Skip to content

Commit 5c46547

Browse files
committed
Eslint fix
1 parent bda0f77 commit 5c46547

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

modules/@apostrophecms/admin-bar/index.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = {
3838
}
3939
};
4040
let index = 1;
41-
for (const [name, screen] of Object.entries(breakpointPreviewModeScreens)) {
41+
for (const [ name, screen ] of Object.entries(breakpointPreviewModeScreens)) {
4242
// Up to 9 shortcuts available
4343
if (index === 9) {
4444
break;
@@ -264,7 +264,7 @@ module.exports = {
264264
) {
265265
menu = {
266266
menu: true,
267-
items: [item],
267+
items: [ item ],
268268
leader: item,
269269
label: self.groupLabels[item.name] || item.label
270270
};
@@ -399,7 +399,10 @@ module.exports = {
399399

400400
const item = _.find(self.items, { name });
401401
if (item && !processedItems.has(name)) {
402-
validGroupItems.push({ item, name });
402+
validGroupItems.push({
403+
item,
404+
name
405+
});
403406
}
404407
});
405408

@@ -621,8 +624,8 @@ module.exports = {
621624
}
622625

623626
if (item.options && Object.keys(item.options).length > 0) {
624-
console.log(` Options:`);
625-
Object.entries(item.options).forEach(([key, value]) => {
627+
console.log(' Options:');
628+
Object.entries(item.options).forEach(([ key, value ]) => {
626629
console.log(` ${key}: ${JSON.stringify(value)}`);
627630
});
628631
}

test/admin-bar.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ describe('Admin bar', function () {
166166
addGroups: [
167167
{
168168
label: 'Alpha Group',
169-
items: ['@apostrophecms/image-tag', '@apostrophecms/file-tag']
169+
items: [ '@apostrophecms/image-tag', '@apostrophecms/file-tag' ]
170170
},
171171
{
172172
label: 'Beta Group',
173-
items: ['@apostrophecms/image', '@apostrophecms/file']
173+
items: [ '@apostrophecms/image', '@apostrophecms/file' ]
174174
}
175175
]
176176
}
@@ -213,7 +213,7 @@ describe('Admin bar', function () {
213213
addGroups: [
214214
{
215215
label: 'Test Group',
216-
items: ['item-a', 'item-b', 'item-c'] // All grouped despite last/after
216+
items: [ 'item-a', 'item-b', 'item-c' ] // All grouped despite last/after
217217
}
218218
]
219219
}
@@ -253,7 +253,7 @@ describe('Admin bar', function () {
253253
},
254254
'@apostrophecms/admin-bar': {
255255
options: {
256-
order: ['item-x', '@apostrophecms/user', 'item-y', '@apostrophecms/image']
256+
order: [ 'item-x', '@apostrophecms/user', 'item-y', '@apostrophecms/image' ]
257257
}
258258
}
259259
}
@@ -388,7 +388,7 @@ describe('Admin bar', function () {
388388
modules: {
389389
'@apostrophecms/admin-bar': {
390390
options: {
391-
order: ['@apostrophecms/user']
391+
order: [ '@apostrophecms/user' ]
392392
}
393393
},
394394
// Add a module with last:true to test positioning
@@ -428,7 +428,7 @@ describe('Admin bar', function () {
428428
},
429429
'@apostrophecms/admin-bar': {
430430
options: {
431-
order: ['item-x', '@apostrophecms/user', 'item-y', '@apostrophecms/image']
431+
order: [ 'item-x', '@apostrophecms/user', 'item-y', '@apostrophecms/image' ]
432432
}
433433
}
434434
}
@@ -457,7 +457,7 @@ describe('Admin bar', function () {
457457
modules: {
458458
'@apostrophecms/admin-bar': {
459459
options: {
460-
order: ['@apostrophecms/image'],
460+
order: [ '@apostrophecms/image' ],
461461
addGroups: [
462462
{
463463
label: 'Media',
@@ -544,7 +544,7 @@ describe('Admin bar', function () {
544544
modules: {
545545
'@apostrophecms/admin-bar': {
546546
options: {
547-
order: ['@apostrophecms/user'], // user is ordered, but not the group leader
547+
order: [ '@apostrophecms/user' ], // user is ordered, but not the group leader
548548
addGroups: [
549549
{
550550
label: 'Media',

0 commit comments

Comments
 (0)