Support single element or top level arrays
- Dominant language
- JavaScript
- Stars
- 221
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Building on @theianjones's proposal in #3.
> 1 open question is how to represent an array with a single element. The only idea I had was fragments like `<>...`. But that would be a separate PR anyway.
Given a component-like function:
```jsx
const Aliases = () => (
<>
)
```
Expect ``:
```json5
[
{
// name: "alias",?
from: "react",
to: "preact-compat",
},
{
// name: "alias",?
from: "react-dom",
to: "preact-compat",
},
]
```
Given:
```jsx
const Resolve = () => (
<>
)
```
Expect ``:
```json5
{
name: "resolve",
alias: [
{
from: "react-dom",
to: "preact-compat",
},
],
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.