Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@babel/plugin-syntax-jsx
Advanced tools
The @babel/plugin-syntax-jsx npm package allows Babel to parse JSX syntax. JSX is a syntax extension for JavaScript, commonly used with React to describe what the UI should look like. By enabling this plugin, Babel can understand and process JSX syntax, but it does not transform it. To transform JSX, you would need to use another plugin like @babel/plugin-transform-react-jsx.
JSX Parsing
This plugin allows Babel to parse JSX syntax like the one in the code sample, which represents a React element.
const element = <div>Hello, world!</div>;
This package not only parses JSX syntax but also transforms it into React.createElement calls, making it suitable for use in a React application.
This is a Babel preset for all React plugins, including JSX syntax parsing and transformation. It is a more comprehensive package for React development.
Similar to the JSX transformation plugin for React, this plugin is tailored for Vue.js and transforms JSX into Vue.js render functions.
Allow parsing of jsx
See our website @babel/plugin-syntax-jsx for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-jsx
or using yarn:
yarn add @babel/plugin-syntax-jsx --dev
FAQs
Allow parsing of jsx
The npm package @babel/plugin-syntax-jsx receives a total of 26,540,666 weekly downloads. As such, @babel/plugin-syntax-jsx popularity was classified as popular.
We found that @babel/plugin-syntax-jsx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.