We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fefe34f commit 92fbb2fCopy full SHA for 92fbb2f
rules/shared/package-json.js
@@ -5,12 +5,13 @@ const directoryCache = new Map();
5
const dataCache = new Map();
6
7
/**
8
- Finds the closest package.json file to the given directory and returns its path and contents.
9
- Caches the result for future lookups.
+Finds the closest package.json file to the given directory and returns its path and contents.
10
11
- @param dirname {string}
12
- @return {{ path: string, packageJson: Record<string, unknown> } | undefined}
13
- */
+Caches the result for future lookups.
+
+@param dirname {string}
+@return {{ path: string, packageJson: Record<string, unknown> } | undefined}
14
+*/
15
export function readPackageJson(dirname) {
16
if (directoryCache.has(dirname)) {
17
const packageJsonPath = directoryCache.get(dirname);
0 commit comments