Skip to content

Commit

Permalink
prettier: Set trailingComman to es5 (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 authored Nov 12, 2024
1 parent d6da0eb commit c6f2364
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
with:
fetch-depth: 30

- uses: actions/setup-node@v4

- uses: actions/setup-python@v5
with:
python-version: '3.x'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/gadget-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
singleQuote: true
trailingComma: es5
overrides:
- files: "gadgets/**/{G,g}adget_definition:*"
options:
Expand Down
6 changes: 3 additions & 3 deletions gadgets/bookflap/mediawiki%3Agadget-bookflap.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@

$raws.each(function () {
var $title = $(this).find(
'.book-flap-title a, .book-flap-title .mw-selflink',
'.book-flap-title a, .book-flap-title .mw-selflink'
);
var $slideBookFlap = $('<div></div>')
.addClass('book-flap-slide')
.html($(this).find('book-flap-raw book-flap-title'))
.append(
$(this).find('.book-flap-body').clone().addClass('mw-parser-output'),
$(this).find('.book-flap-body').clone().addClass('mw-parser-output')
)
.appendTo($overlay);

Expand Down Expand Up @@ -85,7 +85,7 @@
.addClass('book-flap-side')
.html($(this).find('book-flap-raw book-flap-title'))
.append(
$(this).find('.book-flap-body').clone().addClass('mw-parser-output'),
$(this).find('.book-flap-body').clone().addClass('mw-parser-output')
)
.appendTo($(this).hasClass('book-flap-left') ? $leftside : $rightside)
.hide()
Expand Down
8 changes: 4 additions & 4 deletions gadgets/create-redirect/mediawiki%3Agadget-create-redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
'#',
'여기로 넘겨주기',
'p-createRedirect',
'이 문서로 오는 넘겨주기 문서를 만듭니다.',
),
'이 문서로 오는 넘겨주기 문서를 만듭니다.'
)
).on('click', function (e) {
e.preventDefault();
target = mw.config.get('wgPageName').replace(/_/g, ' ');
Expand Down Expand Up @@ -62,7 +62,7 @@
title +
'" 문서에서 "' +
target +
'" 문서로 넘겨주기를 만드시겠습니까?',
'" 문서로 넘겨주기를 만드시겠습니까?'
)
.done(function (confirmed) {
if (confirmed) {
Expand All @@ -75,7 +75,7 @@
'" 문서에서 ' +
'"' +
target +
'" 문서로 넘겨주기 문서가 생성되었습니다.',
'" 문서로 넘겨주기 문서가 생성되었습니다.'
);
})
.fail(function (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if (isLinkToSanction) {
$(this).html(
'사용자:' + substitute + ' 님에 대한 부적절한 사용자명 변경 건의',
'사용자:' + substitute + ' 님에 대한 부적절한 사용자명 변경 건의'
);
}
});
Expand Down
8 changes: 4 additions & 4 deletions gadgets/imageview/mediawiki%3Agadget-imageview.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
$('<img></img>')
.attr(
'src',
'https://upload.wikimedia.org/wikipedia/commons/d/de/Ajax-loader.gif',
'https://upload.wikimedia.org/wikipedia/commons/d/de/Ajax-loader.gif'
)
.addClass('loading-spinner'),
.addClass('loading-spinner')
);

$('body').css('overflow', 'hidden');
Expand All @@ -29,7 +29,7 @@
titles: decodeURI(
$(this)
.attr('href')
.match(/\/([^/]+)$/)[1],
.match(/\/([^/]+)$/)[1]
),
prop: 'imageinfo',
iiprop: 'url',
Expand All @@ -42,7 +42,7 @@
});

overlay.append(
$('<img></img>').attr('src', imageSource).addClass('image'),
$('<img></img>').attr('src', imageSource).addClass('image')
);
});
});
Expand Down
8 changes: 4 additions & 4 deletions gadgets/mute/mediawiki%3Agadget-mute.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
' 여러 브라우저로 페미위키를 이용하시는 분들은 각 브라우저별로' +
' 키워드를 등록해주시기 바랍니다.' +
'</p>' +
'</div>',
'</div>'
);

function _initUI() {
Expand All @@ -25,8 +25,8 @@
'#',
'뮤트',
'p-mute',
'금지어를 설정합니다.',
),
'금지어를 설정합니다.'
)
).on('click', function (e) {
e.preventDefault();
$editorEl.show();
Expand Down Expand Up @@ -58,7 +58,7 @@
$('#mw-content-text').prepend(
'<div class="notice warning">' +
'가림 단어가 포함된 문서입니다. 이 문서의 제목 또는 본문에 한 개 이상의 가림 단어가 있습니다.' +
'</div>',
'</div>'
);
}

Expand Down
6 changes: 3 additions & 3 deletions gadgets/rc-lazy-load/mediawiki%3Agadget-rc-lazy-load.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// 바뀐글 링크를 limit가 0인 링크로 바꿉니다.
$('#site-navigation .changes a').attr(
'href',
$('#site-navigation .changes a').attr('href') + '?limit=0',
$('#site-navigation .changes a').attr('href') + '?limit=0'
);

if (
Expand Down Expand Up @@ -46,12 +46,12 @@

// limit를 50으로 변경하는 버튼
var btn = $(
'.mw-rcfilters-ui-changesLimitPopupWidget .oo-ui-buttonSelectWidget a',
'.mw-rcfilters-ui-changesLimitPopupWidget .oo-ui-buttonSelectWidget a'
).eq(limitButtonIndex);

// 버튼을 누르는 동작을 흉내냅니다. 즉 limit를 50으로 다시 설정합니다.
btn.trigger(
jQuery.Event('mousedown', { which: OO.ui.MouseButtons.LEFT }),
jQuery.Event('mousedown', { which: OO.ui.MouseButtons.LEFT })
);
btn[0].dispatchEvent(new MouseEvent('mouseup'));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var AddReferencesListCommand = function () {
AddReferencesListCommand.parent.call(
this,
'addReferencesList', // Command name
'addReferencesList' // Command name
);
};
OO.inheritClass(AddReferencesListCommand, ve.ui.Command);
Expand Down Expand Up @@ -46,7 +46,7 @@
isResponsive: mw.config.get('wgCiteResponsiveReferences'),
},
})
.concat({ type: '/mwReferencesList' }),
.concat({ type: '/mwReferencesList' })
)
.collapseToEnd()
.select();
Expand All @@ -61,8 +61,8 @@
'addReferencesList', // Sequence name
'addReferencesList', // Command name
'=r',
2,
),
2
)
);

ve.ui.commandHelpRegistry.register('insert', 'addReferencesList', {
Expand All @@ -86,7 +86,7 @@
// Parent constructor
AddNotesSectionCommand.parent.call(
this,
'addNotesSection', // Command name
'addNotesSection' // Command name
);
};
OO.inheritClass(AddNotesSectionCommand, ve.ui.Command);
Expand Down Expand Up @@ -130,7 +130,7 @@
},
},
})
.concat({ type: '/mwTransclusionBlock' }),
.concat({ type: '/mwTransclusionBlock' })
)
.collapseToEnd()
.select();
Expand All @@ -145,8 +145,8 @@
'addNotesSection', // Sequence name
'addNotesSection', // Command name
'=n',
2,
),
2
)
);

ve.ui.commandHelpRegistry.register('insert', 'addNotesSection', {
Expand Down Expand Up @@ -203,8 +203,8 @@
'dash',
'bulletWrapOnce',
[{ type: 'paragraph' }, '-', ' '],
2,
),
2
)
);

ve.ui.commandHelpRegistry.register('formatting', 'listBullet', {
Expand Down

0 comments on commit c6f2364

Please sign in to comment.