1.0.6 • Published 6 years ago

babel-plugin-react-remove-attributes v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

babel-plugin-react-remove-attributes

npm version Build Status

About

This plugin will remove specified attributes from React components. The default attribute to be removed is data-test-id.

This could be useful for removing tags used for testing eg:

<Button data-test-id="run_button">Run</Button>

will become:

<Button>Run</Button>

How to use

By default, data-test-id is removed.

It's possible to pass attributes that we want to remove in several ways:

Input typeexample
stringdata-test-something
array of strings['data-test-one', 'data-test-two']
regular expression/data-test-*/
array of regular expressions[/data-test-*/, /data-details-*/]

TODO:

  • Replace lodash isEqual check
1.0.6

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago