Skip to content

Commit 4b95b36

Browse files
authored
Update package-json.js
1 parent 1ed0702 commit 4b95b36

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: rules/shared/package-json.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ const directoryCache = new Map();
55
const dataCache = new Map();
66

77
/**
8-
Finds the closest package.json file to the given directory and returns its path and contents.
9-
Caches the result for future lookups.
8+
Finds the closest package.json file to the given directory and returns its path and contents.
109
11-
@param dirname {string}
12-
@return {{ path: string, packageJson: Record<string, unknown> } | undefined}
13-
*/
10+
Caches the result for future lookups.
11+
12+
@param dirname {string}
13+
@return {{ path: string, packageJson: Record<string, unknown> } | undefined}
14+
*/
1415
export function readPackageJson(dirname) {
1516
if (directoryCache.has(dirname)) {
1617
const packageJsonPath = directoryCache.get(dirname);

0 commit comments

Comments
 (0)