mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-14 08:58:28 +00:00
Enable consistent return eslint rule (#3065)
This commit is contained in:
committed by
GitHub
parent
c394ea30ef
commit
135176f073
+1
-1
@@ -38,7 +38,7 @@
|
||||
// "setWithoutGet": true
|
||||
// }],
|
||||
// "block-scoped-var": "warn",
|
||||
// "consistent-return": "error",
|
||||
"consistent-return": "error",
|
||||
// "curly": "error",
|
||||
// "default-case": "warn",
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -109,6 +109,8 @@ const fetchRepo = async (username, reponame) => {
|
||||
starCount: data.organization.repository.stargazers.totalCount,
|
||||
};
|
||||
}
|
||||
|
||||
throw new Error("Unexpected behavior");
|
||||
};
|
||||
|
||||
export { fetchRepo };
|
||||
|
||||
Reference in New Issue
Block a user