File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "presets" : [
3+ " react"
4+ ]
5+ }
Original file line number Diff line number Diff line change 11{
22 "name" : " babel-plugin-react-remove-properties" ,
3- "version" : " 0.1.1 " ,
3+ "version" : " 0.2.0 " ,
44 "description" : " Removes React properties" ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
2525 "url" : " https://github.com/oliviertassinari/babel-plugin-react-remove-properties/issues"
2626 },
2727 "dependencies" : {
28- "babel-core" : " ^5.6.4 "
28+ "babel-core" : " ^6.2.1 "
2929 },
3030 "devDependencies" : {
31+ "babel-cli" : " ^6.2.0" ,
32+ "babel-preset-react" : " ^6.1.18" ,
3133 "istanbul" : " ^0.4.0" ,
3234 "mocha" : " ^2.2.5"
3335 }
Original file line number Diff line number Diff line change 11'use strict' ;
22
3- module . exports = function ( { Plugin } ) {
4- return new Plugin ( 'react-remove-properties' , {
3+ module . exports = function ( ) {
4+ return {
55 visitor : {
6- JSXIdentifier ( node ) {
7- if ( node . name === 'data-test' ) {
8- this . parentPath . dangerouslyRemove ( ) ;
6+ JSXIdentifier : function ( path ) {
7+ if ( path . node . name === 'data-test' ) {
8+ path . parentPath . remove ( ) ;
99 }
1010 } ,
1111 } ,
12- } ) ;
12+ } ;
1313} ;
Original file line number Diff line number Diff line change 11React . createClass ( {
2- render ( ) {
2+ render : function ( ) {
33 return (
44 < div className = "bar" data-test = "thisIsASelectorForSelenium" >
55 Hello Wold!
Original file line number Diff line number Diff line change 1- "use strict" ;
2-
31React . createClass ( {
4- render : function render ( ) {
2+ render : function ( ) {
53 return React . createElement (
64 "div" ,
75 { className : "bar" } ,
86 "Hello Wold!"
97 ) ;
108 }
119} ) ;
12-
You can’t perform that action at this time.
0 commit comments