Enable consistent return eslint rule (#3065)

This commit is contained in:
Alexandr Garbuzov
2023-08-12 09:11:12 +03:00
committed by GitHub
parent c394ea30ef
commit 135176f073
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -38,7 +38,7 @@
// "setWithoutGet": true
// }],
// "block-scoped-var": "warn",
// "consistent-return": "error",
"consistent-return": "error",
// "curly": "error",
// "default-case": "warn",
+3 -1
View File
@@ -113,7 +113,7 @@ const isPreviewComment = (inputs, comment) => {
* @param {string} owner Owner of the repository.
* @param {string} repo Repository name.
* @param {string} commenter Comment author.
* @returns {Object} The GitHub comment object.
* @returns {Object | undefined} The GitHub comment object.
*/
const findComment = async (octokit, issueNumber, owner, repo, commenter) => {
const parameters = {
@@ -141,6 +141,8 @@ const findComment = async (octokit, issueNumber, owner, repo, commenter) => {
debug(`No theme preview comment found.`);
}
}
return undefined;
};
/**
+2
View File
@@ -109,6 +109,8 @@ const fetchRepo = async (username, reponame) => {
starCount: data.organization.repository.stargazers.totalCount,
};
}
throw new Error("Unexpected behavior");
};
export { fetchRepo };