[rust] relay-compiler to support template literals across lines.
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
with the new rust compiler if a template literal spans more than one line it will refuse to output artifacts—this is prevliant when used with Prettier that decides its own formatting:
```ts
// ❌ No produced documents
const Thing = ({ search: searchRef }) => {
const search = useFragment(
graphql`
fragment search_data on SearchItem {
name
}
`,
searchRef,
);
return
{ search.name } < /h1>;;
};
// ✅ Produces documents
const Thing = ({ search: searchRef }) => {
const search = useFragment(
graphql`fragment search_data on SearchItem {
name
}`,
searchRef,
);
return
{ search.name } < /h1>;;
};
```
Like i suggested, this is more than okay to enforce — but with a lack of control to when prettier does stuff it makse it hard to enforce that?
---
More than happy to help rectify this, but will need to just be pointed at the correct files to go to impl this.
Contributor guide
Assessment
This issue has not been assessed yet.