I would like to statically analyze the rsx files to verify that they follow our team's development rules.
For example, “Do not use the ParentWindowQuery placeholder".
I have tried to parse rsx files using ts-morph, but the format of the rsx files is slightly different from tsx, so I cannot parse them correctly.
rsx
<ParentWindowQuery
id="id"
errorTransformer="// The variable 'data' allows you to reference the request's data in the transformer.
// example: return data.find(element => element.isError)
return data.error"
resourceName="ParentWindow"
resourceTypeOverride=""
selector="id"
transformer="// Query results are available as the `data` variable
return data"
>
Formatted as tsx, it looks like this
<ParentWindowQuery
id="id"
errorTransformer="// The variable 'data' allows you to reference the request's data in the transformer. \n// example: return data.find(element => element.isError)\nreturn data.error"
resourceName="ParentWindow"
resourceTypeOverride=""
selector="id"
transformer="// Query results are available as the `data` variable\nreturn data"
/>