UNPKG

586 BJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7exports.default = function () {
8 return {
9 visitor: {
10 Program: function Program(path, state) {
11 var properties = state.opts.properties || [];
12 if (properties.length === 0) {
13 properties.push('data-testid');
14 }
15 path.traverse({
16 JSXIdentifier: function JSXIdentifier(path2) {
17 if (properties.indexOf(path2.node.name.toLowerCase()) > -1) {
18 path2.parentPath.remove();
19 }
20 }
21 });
22 }
23 }
24 };
25};
\No newline at end of file