{"id":16042405,"url":"https://github.com/nylen/babel-plugin-transform-jsx-flexible","last_synced_at":"2026-06-21T18:31:59.887Z","repository":{"id":137374965,"uuid":"92323359","full_name":"nylen/babel-plugin-transform-jsx-flexible","owner":"nylen","description":"Turn JSX into arbitrary function calls","archived":false,"fork":false,"pushed_at":"2017-05-27T21:51:45.000Z","size":24,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-06T15:30:01.746Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nylen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-24T18:21:33.000Z","updated_at":"2020-02-23T03:02:58.000Z","dependencies_parsed_at":"2023-07-29T22:27:24.394Z","dependency_job_id":null,"html_url":"https://github.com/nylen/babel-plugin-transform-jsx-flexible","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nylen/babel-plugin-transform-jsx-flexible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fbabel-plugin-transform-jsx-flexible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fbabel-plugin-transform-jsx-flexible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fbabel-plugin-transform-jsx-flexible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fbabel-plugin-transform-jsx-flexible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nylen","download_url":"https://codeload.github.com/nylen/babel-plugin-transform-jsx-flexible/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylen%2Fbabel-plugin-transform-jsx-flexible/sbom","scorecard":{"id":699876,"data":{"date":"2025-08-18","repo":{"name":"github.com/nylen/babel-plugin-transform-jsx-flexible","commit":"85c9098584dc485d707d442badd1b32aee4d9f7b"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":2.6,"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T04:57:07.401Z","repository_id":137374965,"created_at":"2025-08-22T04:57:07.401Z","updated_at":"2025-08-22T04:57:07.401Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34622271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"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-10-09T00:01:39.097Z","updated_at":"2026-06-21T18:31:59.871Z","avatar_url":"https://github.com/nylen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-transform-jsx-flexible [![Build status](https://img.shields.io/travis/nylen/babel-plugin-transform-jsx-flexible/master.svg?style=flat)](https://travis-ci.org/nylen/babel-plugin-transform-jsx-flexible) [![npm package](http://img.shields.io/npm/v/babel-plugin-transform-jsx-flexible.svg?style=flat)](https://www.npmjs.org/package/babel-plugin-transform-jsx-flexible)\n\n\u003e Turn JSX into arbitrary function calls\n\nThis is a drop-in replacement for\n[`babel-plugin-transform-react-jsx`](https://github.com/babel/babel/tree/v6.24.1/packages/babel-plugin-transform-react-jsx),\nwith the additional feature that multiple JSX handler functions can be used in\nthe same file.  The plugin passes all tests for the `transform-react-jsx`\nplugin (included in this repo).\n\nChanging the JSX handler within a file is accomplished by enclosing a JSX block\nwithin a special tag that is defined in the plugin's configuration (see the\n[`tags`](#tags)\noption below).\n\n## Installation\n\n```sh\nnpm install --save-dev babel-plugin-transform-react-jsx\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\nWithout options (no different from `transform-react-jsx`):\n\n```json\n{\n  \"plugins\": [\"transform-jsx-flexible\"]\n}\n```\n\nWith options:\n\n```json\n{\n  \"plugins\": [\n    [\"transform-jsx-flexible\", {\n      \"tags\": {\n        \"CustomTag1\": \"createElement_CustomTag1\",\n        \"CustomTag2\": \"createElement_CustomTag2\"\n      }\n    }]\n  ]\n}\n```\n\n**Code In**\n\n```javascript\nvar profile = \u003cdiv\u003e\n  \u003cimg src=\"avatar.png\" className=\"profile\" /\u003e\n  \u003ch3\u003e{[user.firstName, user.lastName].join(' ')}\u003c/h3\u003e\n\u003c/div\u003e;\n\nvar somethingElse = \u003cCustomTag1\u003e\n  \u003cdiv /\u003e\n\u003c/CustomTag1\u003e;\n```\n\n**Code Out**\n\n```javascript\nvar profile = React.createElement(\"div\", null,\n  React.createElement(\"img\", { src: \"avatar.png\", className: \"profile\" }),\n  React.createElement(\"h3\", null, [user.firstName, user.lastName].join(\" \"))\n);\n\nvar somethingElse = createElement_CustomTag1(CustomTag1, null,\n  createElement_CustomTag1(\"div\", null)\n);\n```\n\n## Options\n\n### `pragma`\n\n_Inherited from `babel-plugin-transform-react-jsx`._\n\n`string`, defaults to `React.createElement`.\n\nReplace the function used when compiling JSX expressions.\n\nNote that the `@jsx React.DOM` pragma has been deprecated as of React v0.12\n\n### `useBuiltIns`\n\n_Inherited from `babel-plugin-transform-react-jsx`._\n\n`boolean`, defaults to `false`.\n\nWhen spreading props, use `Object.assign` directly instead of Babel's extend helper.\n\n### `tags`\n\nAn object that maps custom JSX tag names (the keys) to custom functions (the\nvalues) that should be used to render any JSX element enclosed inside the given\ncustom tag name.\n\nFor example:\n\n```js\n\"plugins\": [\n  \"transform-jsx-flexible\",\n  {\n    \"tags\": {\n      \"CustomTag1\": \"createElement_CustomTag1\",\n      \"CustomTag2\": \"createElement_CustomTag2\"\n    }\n  }\n]\n```\n\nUsing this configuration, any `CustomTag1` element and any JSX elements\nenclosed inside of it will be created using the function\n`createElement_CustomTag1()` in the transpiled JS code, instead of\n`React.createElement` (or the current default JSX function).\n\nThe same goes for `CustomTag2` and `createElement_CustomTag2`.  Also, JSX\nhandlers can be changed within the same block by nesting these custom tags\ntogether.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylen%2Fbabel-plugin-transform-jsx-flexible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnylen%2Fbabel-plugin-transform-jsx-flexible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylen%2Fbabel-plugin-transform-jsx-flexible/lists"}