Skip to content

Commit a061527

Browse files
authored
chore: Remove unused functions (#16868)
1 parent 67aa37b commit a061527

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

lib/eslint/eslint-helpers.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -568,41 +568,6 @@ async function findFiles({
568568
];
569569
}
570570

571-
572-
/**
573-
* Checks whether a file exists at the given location
574-
* @param {string} resolvedPath A path from the CWD
575-
* @throws {Error} As thrown by `fs.statSync` or `fs.isFile`.
576-
* @returns {boolean} `true` if a file exists
577-
*/
578-
function fileExists(resolvedPath) {
579-
try {
580-
return fs.statSync(resolvedPath).isFile();
581-
} catch (error) {
582-
if (error && (error.code === "ENOENT" || error.code === "ENOTDIR")) {
583-
return false;
584-
}
585-
throw error;
586-
}
587-
}
588-
589-
/**
590-
* Checks whether a directory exists at the given location
591-
* @param {string} resolvedPath A path from the CWD
592-
* @throws {Error} As thrown by `fs.statSync` or `fs.isDirectory`.
593-
* @returns {boolean} `true` if a directory exists
594-
*/
595-
function directoryExists(resolvedPath) {
596-
try {
597-
return fs.statSync(resolvedPath).isDirectory();
598-
} catch (error) {
599-
if (error && (error.code === "ENOENT" || error.code === "ENOTDIR")) {
600-
return false;
601-
}
602-
throw error;
603-
}
604-
}
605-
606571
//-----------------------------------------------------------------------------
607572
// Results-related Helpers
608573
//-----------------------------------------------------------------------------
@@ -924,8 +889,6 @@ function getCacheFile(cacheFile, cwd) {
924889

925890
module.exports = {
926891
isGlobPattern,
927-
directoryExists,
928-
fileExists,
929892
findFiles,
930893

931894
isNonEmptyString,

0 commit comments

Comments
 (0)