1.0.0 • Published 6 years ago

babel-plugin-remove-attribute v1.0.0

Weekly downloads
3,091
License
MIT
Repository
github
Last release
6 years ago

babel-plugin-remove-attribute CircleCI npm version

Plugin to remove a single attribute from JSX elements.

Usage

.babelrc

{
  plugins: [
    ..., 
    ['babel-plugin-remove-attribute', { 
      attribute: (attribute name here),
    }], 
    ...,
  ],
}

Motivation

When locating elements for testing (e.g. React, Selenium), it's common to do so via a class on the element. This couples styling with testing though, so it's a better idea to use a custom attribute on the elements. You can then use the plugin for production code to remove these from the DOM, if you care enough.

1.0.0

6 years ago

0.0.8

7 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago