From 330ea996bef03e7adb426ff54706354b87da785a Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Fri, 18 Jan 2019 20:21:12 +0000 Subject: [PATCH] Add directory details to the package.json of all packages (#14628) Specifying the directory as part of the `repository` field in a `package.json` allows third party tools to provide better support when working with monorepos. For example, it allows them to correctly construct a commit diff for a specific package. This format was accepted by npm in https://github.com/npm/rfcs/pull/19. --- packages/eslint-plugin-react-hooks/package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin-react-hooks/package.json b/packages/eslint-plugin-react-hooks/package.json index efac100..9601b49 100644 --- a/packages/eslint-plugin-react-hooks/package.json +++ b/packages/eslint-plugin-react-hooks/package.json @@ -3,7 +3,11 @@ "name": "eslint-plugin-react-hooks", "description": "ESLint rules for React Hooks", "version": "0.0.0", - "repository": "facebook/react", + "repository": { + "type" : "git", + "url" : "https://github.com/facebook/react.git", + "directory": "packages/eslint-plugin-react-hooks" + }, "files": [ "LICENSE", "README.md",