{"id":42894592,"url":"https://github.com/erykpiast/bs-react-syntax-highlighter","last_synced_at":"2026-01-30T15:03:47.243Z","repository":{"id":42956870,"uuid":"230466897","full_name":"erykpiast/bs-react-syntax-highlighter","owner":"erykpiast","description":"ReasonML bindings for react-syntax-highlighter library","archived":false,"fork":false,"pushed_at":"2023-01-05T04:52:39.000Z","size":2529,"stargazers_count":4,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T23:03:08.137Z","etag":null,"topics":["bindings","reason-react","reasonml","syntax-highlighting"],"latest_commit_sha":null,"homepage":null,"language":"OCaml","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/erykpiast.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-27T15:25:31.000Z","updated_at":"2021-09-22T21:46:52.000Z","dependencies_parsed_at":"2023-02-03T10:31:58.942Z","dependency_job_id":null,"html_url":"https://github.com/erykpiast/bs-react-syntax-highlighter","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/erykpiast/bs-react-syntax-highlighter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erykpiast%2Fbs-react-syntax-highlighter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erykpiast%2Fbs-react-syntax-highlighter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erykpiast%2Fbs-react-syntax-highlighter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erykpiast%2Fbs-react-syntax-highlighter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erykpiast","download_url":"https://codeload.github.com/erykpiast/bs-react-syntax-highlighter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erykpiast%2Fbs-react-syntax-highlighter/sbom","scorecard":{"id":382056,"data":{"date":"2025-08-11","repo":{"name":"github.com/erykpiast/bs-react-syntax-highlighter","commit":"5d063f90de290b45a1e18e31165dea3a99822fd5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/2 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":"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":"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":"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: MIT License: 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"36 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-v88g-cgmw-v5xw","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-vfrc-7r7c-w9mx","Warn: Project is vulnerable to: GHSA-7wwv-vh3v-89cq","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","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-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-wvhm-4hhf-97x9","Warn: Project is vulnerable to: GHSA-h4hr-7fg3-h35w","Warn: Project is vulnerable to: GHSA-gj77-59wh-66hg","Warn: Project is vulnerable to: GHSA-hqhp-5p83-hx96","Warn: Project is vulnerable to: GHSA-3949-f494-cm99","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","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-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-18T15:41:19.837Z","repository_id":42956870,"created_at":"2025-08-18T15:41:19.837Z","updated_at":"2025-08-18T15:41:19.837Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bindings","reason-react","reasonml","syntax-highlighting"],"created_at":"2026-01-30T15:03:45.844Z","updated_at":"2026-01-30T15:03:47.228Z","avatar_url":"https://github.com/erykpiast.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bs-react-syntax-highlighter\n\n[![Build Status](https://travis-ci.com/erykpiast/bs-react-syntax-highlighter.svg?branch=master)](https://travis-ci.com/erykpiast/bs-react-syntax-highlighter)\n[![dependencies Status](https://david-dm.org/erykpiast/bs-react-syntax-highlighter/status.svg)](https://david-dm.org/erykpiast/bs-react-syntax-highlighter)\n[![devDependencies Status](https://david-dm.org/erykpiast/bs-react-syntax-highlighter/dev-status.svg)](https://david-dm.org/erykpiast/bs-react-syntax-highlighter?type=dev)\n[![peerDependencies Status](https://david-dm.org/erykpiast/bs-react-syntax-highlighter/peer-status.svg)](https://david-dm.org/erykpiast/bs-react-syntax-highlighter?type=peer)\n[![Greenkeeper badge](https://badges.greenkeeper.io/erykpiast/bs-react-syntax-highlighter.svg)](https://greenkeeper.io/)\n\nReasonML bindings for [react-syntax-highlighter](https://github.com/conorhastings/react-syntax-highlighter) library.\n\n## Installation\n\n```\nnpm i --save bs-react-syntax-highlighter react-syntax-highlighter\n```\n\nThen add `bs-react-syntax-highlighter` as a dependency to `bsconfig.json`.\n\n## Usage\n\nUnlike in the JavaScript counterpart, there is no default highlighter - you have to choose Hljs or Prism explicitly.\n\n```reasonml\n[@react.component]\nlet make = () =\u003e {\n  \u003cReactSyntaxHighlighter.Prism style={ReactSyntaxHighlighter.Prism.Style.darcula}\u003e\n    {\"A code to highlight\"}\n  \u003c/ReactSyntaxHighlighter.Prism\u003e;\n};\n```\n\n```reasonml\n[@react.component]\nlet make = () =\u003e {\n  \u003cReactSyntaxHighlighter.Hljs language={`JavaScript}\u003e\n    {\"const foo = () =\u003e {};\"}\n  \u003c/ReactSyntaxHighlighter.Hljs\u003e;\n};\n```\n\n### Props spread\n\nIn JavaScript, there is a possibility to put any property you like on the root element rendered by the component,\nby simply putting it on a component. It's called \"props spread\". `react-syntax-highlighter` supports that pattern as well.\nReasonML [simply can't do it](https://github.com/reasonml/reason-react/blob/master/docs/props-spread.md).\n\nQuite nice escape hatch is wrapping the component you wish to spread props on in another\ncomponent (HOC or High-Order Component), which will inject all passed properties to its child in a not type-safe, but quite an efficient way. [source](https://twitter.com/yawaramin/status/1190120664830816256). There is a runtime cost for this operation, though, so I've decided to not include such code in this library. Pay the cost only when you need to.\n\n```reasonml\nmodule Spread = {\n  [@react.component]\n  let make = (~props, ~children) =\u003e\n    ReasonReact.cloneElement(children, ~props, [||]);\n};\n\n\u003cSpread props={\"id\": \"foobar\"}\u003e\n  \u003cReactSyntaxHighlighter.Hljs language={`JavaScript}\u003e\n    {\"const foo = () =\u003e {};\"}\n  \u003c/ReactSyntaxHighlighter.Hljs\u003e;\n\u003c/Spread\u003e\n```\n\nFor convenience I've included just one such a generic property in component bindings: `className`.\n\n### JSX 2\n\nThe package provides fallback for projects using older version of JSX syntax.\n\n```reasonml\n[@react.component]\nlet make = () =\u003e {\n  \u003cReactSyntaxHighlighter.Hljs.Jsx2 language={`JavaScript}\u003e\n    ...{\"const foo = () =\u003e {};\"}\n  \u003c/ReactSyntaxHighlighter.Hljs.Jsx2\u003e;\n};\n```\n\n## Notes\n\nAn **async build** and a **light build** are not currently supported. PRs are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferykpiast%2Fbs-react-syntax-highlighter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferykpiast%2Fbs-react-syntax-highlighter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferykpiast%2Fbs-react-syntax-highlighter/lists"}