mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[codemod] Fix `experimentalFeatures` codemod for typescript parser

Open MBilalShafi opened this issue 1 year ago • 1 comments

Fix #12874

Weirdly so, the tsx parser vs js parser sometimes behaves differently. It was the case with the removeObjectProperty utility being used in the experimentalFeatures codemod.

This can be visualized here. Try commenting the line 3 of the codemod script export const parser = "tsx"; to have the codemod remove the experimentalFeatures prop properly.

The typescript parser parses the node as ObjectProperty while the js parser parses as Property.

I was not aware of this and I think we should be mindful of testing with both compilers before shipping new codemods.

MBilalShafi avatar Aug 09 '24 11:08 MBilalShafi

Deploy preview: https://deploy-preview-14150--material-ui-x.netlify.app/

Generated by :no_entry_sign: dangerJS against aca4177e0dfd9784d0e94fa16cbd77073085e89b

mui-bot avatar Aug 09 '24 11:08 mui-bot