🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

babel-plugin-react-data-name

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-data-name

Babel plugin for adding React Component name as data attribute

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

babel-plugin-react-data-name

Overview

Babel plugin for adding meaningful identifiers to React Components. This allows our components to have a designated attribute for end-to-end integration tests (without having to add them manually).

Installation

This package is available on npm as babel-plugin-react-data-name, and you can find it here.

To install the latest stable version with Yarn:

$ yarn add --dev babel-plugin-react-data-name

Usage

BABEL CONFIG

{
  "env": {
    "development": {
      "plugins": ["react-data-name"]
    }
  }
}

CUSTOM ATTRIBUTE NAME

You can pass custom attribute name with your .bablerc.

{
  "env": {
    "development": {
      "plugins": [["react-data-name", { "property": "data-test" }]]
    }
  }
}

License

[MIT][license]

FAQs

Package last updated on 24 Dec 2018

Did you know?

Socket

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.

Install

Related posts