{"id":42987425,"url":"https://github.com/chloeandisabel/doc-prop-types","last_synced_at":"2026-01-31T02:30:48.339Z","repository":{"id":57213827,"uuid":"100376263","full_name":"chloeandisabel/doc-prop-types","owner":"chloeandisabel","description":"Generate prop documentation at runtime in tandem with React prop-types.","archived":false,"fork":false,"pushed_at":"2017-12-05T10:14:10.000Z","size":44,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-06T07:29:46.015Z","etag":null,"topics":["components","documentation","proptypes","react"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chloeandisabel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-15T12:43:37.000Z","updated_at":"2020-08-21T07:51:11.000Z","dependencies_parsed_at":"2022-08-26T03:10:53.017Z","dependency_job_id":null,"html_url":"https://github.com/chloeandisabel/doc-prop-types","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chloeandisabel/doc-prop-types","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloeandisabel%2Fdoc-prop-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloeandisabel%2Fdoc-prop-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloeandisabel%2Fdoc-prop-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloeandisabel%2Fdoc-prop-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chloeandisabel","download_url":"https://codeload.github.com/chloeandisabel/doc-prop-types/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chloeandisabel%2Fdoc-prop-types/sbom","scorecard":{"id":278372,"data":{"date":"2025-08-11","repo":{"name":"github.com/chloeandisabel/doc-prop-types","commit":"3c2a9987b8f3f035b74ce1f800f80a6e80dfdb22"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/1 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"74 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-hr2v-3952-633q","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-6394-6h9h-cfjg","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3","Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T15:05:23.026Z","repository_id":57213827,"created_at":"2025-08-17T15:05:23.026Z","updated_at":"2025-08-17T15:05:23.026Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28927115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"online","status_checked_at":"2026-01-31T02:00:09.179Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["components","documentation","proptypes","react"],"created_at":"2026-01-31T02:30:47.656Z","updated_at":"2026-01-31T02:30:48.331Z","avatar_url":"https://github.com/chloeandisabel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doc-prop-types\n\nGenerate prop documentation at runtime in tandem with\n[prop-types](https://github.com/facebook/prop-types).\n\nThis library is for users building development environments, styleguides,\nstorybooks, or anything where you'd like to know about a React component's props\nat runtime. Because the same API sets the PropTypes as well as the\ndocumentation, there can never be a divergence between the two!\n\nUnlike [react-docgen](https://github.com/reactjs/react-docgen), which parses\nsource files of React components and uses that to output JSON that describes\nthat component's props, `doc-prop-types` is used at runtime, which means that it\ncan do two things that react-docgen has some difficulty with:\n\n* Use prop-types from imported components (e.g. `ImageButton.PropTypes = {\n  ...Button.propTypes }`)\n* Allow you to write and structure your components any way you like (multiple\n  components per file, unusual component declarations)\n\nThe only price of this is that this is _nearly_ a drop-in replacement for\nReact's own prop-types package: props are assigned using a `assignPropTypes`\nfunction instead of by assigning to the `propTypes` property.\n\n## Installation\n\n`yarn add doc-prop-types`\n\n## Usage example\n\n### Before\n\n```js\nimport PropTypes from \"prop-types\";\n\nPetOwnerInfo.propTypes = {\n  name: PropTypes.string.isRequired,\n  age: PropTypes.number,\n  pet: PropTypes.shape({\n    name: PropTypes.string.isRequired,\n    species: PropTypes.oneOf(\"Dog\", \"Cat\")\n  })\n};\n```\n\n### After\n\n```js\nimport DocPropTypes, { assignPropTypes } from \"doc-prop-types\";\n// Or with ES5 and `require`:\n// var DocPropTypes = require('doc-prop-types').default ;\n// var assignPropTypes = require('doc-prop-types').assignPropTypes;\n\nassignPropTypes(PetOwnerInfo, {\n  name: DocPropTypes.string.isRequired,\n  age: DocPropTypes.number,\n  pet: DocPropTypes.shape({\n    name: DocPropTypes.string.isRequired,\n    species: DocPropTypes.oneOf(\"Dog\", \"Cat\")\n  })\n});\n```\n\nThe API of DocPropTypes is identical to that of PropTypes, with an exception for\ncustom prop types (see below).\n\n`assignPropTypes` will mutate and return the component given as the first\nargument, with the following new properties added to it:\n\n* `Component.propTypes` will have vanilla proptypes so that React can do its\n  type-checking.\n* `Component.docPropTypes` will have DocPropTypes so that you can import them\n  into other components.\n* `Component.propInfo` will have a description of the props assigned to the\n  component (the good bit).\n\nThe description on `propInfo` will look something like this (in the case of the\nabove example):\n\n```js\n{\n    name: {\n      type: 'string',\n      isRequired: true\n    },\n    age: {\n      type: 'number',\n      isRequired: false\n    },\n    pet: {\n      type: 'shape',\n      isRequired: false,\n      shape: {\n        name: {\n          type: 'string',\n          isRequired: true\n        },\n        species: {\n          type: 'oneOf',\n          isRequired: false,\n          enums: [\n            'Dog',\n            'Cat'\n          ]\n        }\n      }\n    }\n}\n```\n\n## Importing PropTypes from other files\n\nImported propTypes must also be DocPropTypes:\n\n```js\nimport Button from \"./Button\";\n\nconst ImagePropTypes = {\n  src: DocPropTypes.string.isRequired\n};\n\nassignPropTypes(ImageButton, {\n  ...ImagePropTypes,\n  ...Button.docPropTypes\n});\n```\n\nIf it's valid JavaScript, you can structure and combine your DocPropTypes in\nwhatever way you wish.\n\n## Custom prop types\n\nDocPropTypes has one API difference with `prop-types`, and that's with how you\nspecify custom proptypes:\n\n```js\n// In component proptype definition\n{\n  customProp: myCustomPropType;\n}\n\n// With DocPropTypes\n{\n  customProp: DocPropTypes.custom(myCustomPropType);\n}\n```\n\n## Things this package doesn't do (yet)\n\nThe items listed below haven't been excluded for any philosophical reason. We\neither just haven't gotten around to it or don't know how to make a nice API for\nit!\n\n* Doesn't document descriptions/comments to props\n\n## Contributing\n\nPull requests are more than welcome. Please make sure that tests pass (with\n`yarn test`), that linting passes (with `yarn lint`), and that any new\nfunctionality also includes tests. Thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchloeandisabel%2Fdoc-prop-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchloeandisabel%2Fdoc-prop-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchloeandisabel%2Fdoc-prop-types/lists"}