2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

style: turn '()=>' into '() =>' (#6324)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Justin Dhillon
2025-11-12 11:49:37 -08:00
committed by GitHub
parent f73474d02c
commit 4d06112452
11 changed files with 29 additions and 29 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ const renderPRsList = async (tag, template, {comments_threshold= 5, awesome_thre
for(const merge of release.merges) {
const pr = await getIssueById(merge.id);
if (pr && pr.labels.find(({name})=> name === label)) {
if (pr && pr.labels.find(({name}) => name === label)) {
const {reactions, body} = pr;
prs[pr.number] = pr;
pr.isHot = pr.comments > comments_threshold;
+1 -1
View File
@@ -1,6 +1,6 @@
import chalk from 'chalk';
export const colorize = (...colors)=> {
export const colorize = (...colors) => {
if(!colors.length) {
colors = ['green', 'cyan', 'magenta', 'blue', 'yellow', 'red'];
}
+2 -2
View File
@@ -120,8 +120,8 @@ const generateFileReport = async (files, historyCount = 3) => {
const generateBody = async ({files, template = './templates/pr.hbs'} = {}) => {
const data = await generateFileReport(files);
Handlebars.registerHelper('filesize', (bytes)=> bytes != null ? prettyBytes(bytes) : '<unknown>');
Handlebars.registerHelper('percent', (value)=> Number.isFinite(value) ? `${(value * 100).toFixed(1)}%` : `---` );
Handlebars.registerHelper('filesize', (bytes) => bytes != null ? prettyBytes(bytes) : '<unknown>');
Handlebars.registerHelper('percent', (value) => Number.isFinite(value) ? `${(value * 100).toFixed(1)}%` : `---` );
return Handlebars.compile(String(await fs.readFile(template)))(data);
}