Socket
Socket
Sign inDemoInstall

babel-plugin-add-react-displayname

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

test/fixtures/emptyReturn/expected.js

2

index.js

@@ -145,3 +145,3 @@ module.exports = transform;

if (lastBlock.type === 'ReturnStatement') {
return lastBlock.argument.type === 'JSXElement'
return lastBlock.argument !== null && lastBlock.argument.type === 'JSXElement'
}

@@ -148,0 +148,0 @@ }

{
"name": "babel-plugin-add-react-displayname",
"version": "0.0.4",
"version": "0.0.5",
"description": "Automatically add displayName to all your components",

@@ -11,2 +11,3 @@ "main": "index.js",

"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.16.0",

@@ -13,0 +14,0 @@ "mocha": "^3.0.2",

@@ -1,2 +0,2 @@

// Stateless componenet with an arrow function
// Stateless component with an arrow function
var Component2 = ({ value }) => {

@@ -3,0 +3,0 @@ return React.createElement(

@@ -1,2 +0,2 @@

// Stateless componenet with an arrow function
// Stateless component with an arrow function
var Component2 = ({value}) => {

@@ -3,0 +3,0 @@ return (

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc