{"id":21713908,"url":"https://github.com/cytle/remark-react-docgen","last_synced_at":"2026-04-19T03:32:07.446Z","repository":{"id":57353014,"uuid":"302099900","full_name":"cytle/remark-react-docgen","owner":"cytle","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-07T16:50:07.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T15:00:53.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cytle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["jsynowiec"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-10-07T16:43:43.000Z","updated_at":"2020-10-07T16:50:09.000Z","dependencies_parsed_at":"2022-09-16T08:21:41.802Z","dependency_job_id":null,"html_url":"https://github.com/cytle/remark-react-docgen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cytle/remark-react-docgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fremark-react-docgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fremark-react-docgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fremark-react-docgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fremark-react-docgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cytle","download_url":"https://codeload.github.com/cytle/remark-react-docgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fremark-react-docgen/sbom","scorecard":{"id":314793,"data":{"date":"2025-08-11","repo":{"name":"github.com/cytle/remark-react-docgen","commit":"128e99fc5227eb964b5ef493a0e4ff1d974d0276"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/4 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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/cytle/remark-react-docgen/nodejs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/cytle/remark-react-docgen/nodejs.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"30 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"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-17T23:57:34.664Z","repository_id":57353014,"created_at":"2025-08-17T23:57:34.665Z","updated_at":"2025-08-17T23:57:34.665Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31993724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":[],"created_at":"2024-11-26T00:28:44.864Z","updated_at":"2026-04-19T03:32:07.428Z","avatar_url":"https://github.com/cytle.png","language":"TypeScript","funding_links":["https://github.com/sponsors/jsynowiec"],"categories":[],"sub_categories":[],"readme":"[![TypeScript version][ts-badge]][typescript-4-0]\n[![Node.js version][nodejs-badge]][nodejs]\n[![APLv2][license-badge]][license]\n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fcytle%2Fremark-react-docgen%2Fbadge\u0026style=flat)](https://actions-badge.atrox.dev/cytle/remark-react-docgen/goto)\n\n\n# remark-react-docgen\n\n[remark](https://github.com/remarkjs/remark) plugin to transform React component to Markdown by  [`react-docgen`](https://github.com/reactjs/react-docgen)\n\n## Getting Started\n\n``` sh\nyarn add -D remark-react-docgen\n```\n\n``` ts\nimport * as remark from 'remark';\nimport * as reactDocgen from 'remark-react-docgen';\nimport * as vfile from 'to-vfile';\n\nconst doc = vfile.readSync('README.md');\nconsole.log(remark().use(reactDocgen).processSync(doc).contents);\n```\n\nThe Component [`Column.jsx`](./__tests__/components/jsx/Column.jsx)\n\n``` jsx\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\n\n/**\n * Form column.\n */\nexport const Column = () =\u003e {\n  return \u003cdiv\u003eTest\u003c/div\u003e;\n}\n\nColumn.propTypes = {\n  /**\n   * prop1 description\n   */\n  prop1: PropTypes.string,\n  /** prop2 description */\n  prop2: PropTypes.number.isRequired,\n  /**\n   * prop3 description a | b\n   */\n  prop3: PropTypes.func().isRequired,\n  /** prop4 description 中文 */\n  prop4: PropTypes.isRequired.oneOf([\"option1\", \"option2\" ,\"option3\"]),\n};\n\nColumn.defaultProps = {\n  prop1: \"red\",\n  prop5: \"default\",\n};\n\n```\n\nConvert the following Markdown:\n\n``` markdown\n# foo-components\n\n## API\n\n[Column](./Column.jsx \"react-docgen:\")\n```\n\nInto\n\n``` markdown\n# foo-components\n\n## API\n\n### Column\n\nForm column.\n\n#### Props\n\n| Name               | Type                                | Default value | Description              |\n| ------------------ | ----------------------------------- | ------------- | ------------------------ |\n| prop1              | string                              | \"red\"         | prop1 description        |\n| prop2 _(required)_ | number                              |               | prop2 description        |\n| prop3 _(required)_ | func                                |               | prop3 description a \\| b |\n| prop4 _(required)_ | \"option1\" \\| \"option2\" \\| \"option3\" |               | prop4 description 中文   |\n| prop5              |                                     | \"default\"     |                          |\n```\n\n## Options\n\n### `remark().use(reactDocgen[, options])`\n\n#### render\n\nCustom document rendering\n\n``` ts\nimport * as remark from 'remark';\nimport * as reactDocgen from 'remark-react-docgen';\nimport { ReactDocgenRender } from 'remark-react-docgen/build/types';\nimport * as vfile from 'to-vfile';\nimport * as stringWidth from 'string-width';\nimport { tableMdastBuilder } from 'react-docgen-markdown-render';\n\nconst tableRender = (doc: DocumentationObject): Table =\u003e {\n  const dataSource = Object.keys(doc.props).map(name =\u003e ({...doc.props[name], name}));\n  return tableMdastBuilder(dataSource, [\n    { title: '属性', render: (vo) =\u003e u('strong', [u('text', vo.name)]) },\n    { title: '描述', render: (vo) =\u003e vo.description,},\n    { title: '类型', render: (vo) =\u003e u('inlineCode', generatePropType(vo)) },\n    { title: '默认值', render: (vo) =\u003e vo.defaultValue ? vo.defaultValue.value : '-' },\n  ])\n};\n\nconst render: ReactDocgenRender = (docs) =\u003e u('root', docs.map(vo =\u003e tableRender(vo)));\n\nconst doc = vfile.readSync('README.md');\n\nconst { contents } = remark()\n  .use({\n    settings: { stringLength: stringWidth }\n  })\n  .use(reactDocgen, { render })\n  .processSync(doc);\nconsole.log(contents);\n```\n\n## License\n\nLicensed under the APLv2. See the [LICENSE](https://github.com/jsynowiec/node-typescript-boilerplate/blob/master/LICENSE) file for details.\n\n[ts-badge]: https://img.shields.io/badge/TypeScript-4.0-blue.svg\n[typescript-4-0]: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html\n[nodejs-badge]: https://img.shields.io/badge/Node.js-\u003e=%2012.13-blue.svg\n[nodejs]: https://nodejs.org/dist/latest-v12.x/docs/api/\n[license-badge]: https://img.shields.io/badge/license-APLv2-blue.svg\n[license]: https://github.com/jsynowiec/node-typescript-boilerplate/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytle%2Fremark-react-docgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcytle%2Fremark-react-docgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytle%2Fremark-react-docgen/lists"}