mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-07-20 20:18:27 +00:00
refactor: enable curly eslint rule (#3137)
This commit is contained in:
@@ -60,9 +60,12 @@ const generateLinks = (fn) => {
|
||||
};
|
||||
|
||||
const createTableItem = ({ link, label, isRepoCard }) => {
|
||||
if (!link || !label) return "";
|
||||
if (!link || !label) {
|
||||
return "";
|
||||
}
|
||||
return `\`${label}\` ![${link}][${link}${isRepoCard ? "_repo" : ""}]`;
|
||||
};
|
||||
|
||||
const generateTable = ({ isRepoCard }) => {
|
||||
const rows = [];
|
||||
const themesFiltered = Object.keys(themes).filter(
|
||||
|
||||
@@ -75,7 +75,9 @@ class IncorrectJsonFormatError extends Error {
|
||||
* @returns {number} PR number.
|
||||
*/
|
||||
const getPrNumber = () => {
|
||||
if (process.env.MOCK_PR_NUMBER) return process.env.MOCK_PR_NUMBER; // For testing purposes.
|
||||
if (process.env.MOCK_PR_NUMBER) {
|
||||
return process.env.MOCK_PR_NUMBER; // For testing purposes.
|
||||
}
|
||||
|
||||
const pullRequest = github.context.payload.pull_request;
|
||||
if (!pullRequest) {
|
||||
|
||||
Reference in New Issue
Block a user