Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to parse short syntax React fragments #81

Open
Noldaru opened this issue Jan 11, 2019 · 1 comment
Open

Fails to parse short syntax React fragments #81

Noldaru opened this issue Jan 11, 2019 · 1 comment

Comments

@Noldaru
Copy link

Noldaru commented Jan 11, 2019

ESDoc is failing to parse files that contain React fragments in short syntax. (<></>)

warning: could not parse the following code. if you want to use ECMAScript proposals, see https://esdoc.org/manual/feature.html#ecmascript-proposal
/Users/usr1/Code/3dmapping/javascript/packages/console/routes/team/screens/UserTeams.js
128|         ];
129|
130|         return (
131|             <>
132|                 <Row>
133|                     <BackButton fallback={`/users/${this.props.match.params.userId}/profile`}/>
134|                     <PageTitle titleText={["Manage Users", `${user.first_name} ${user.last_name}`, "Teams"]}/>

My configuration is as follows

// .esdoc.json
{
    "source": "./",
    "destination": "./docs",
    "excludes": ["node_modules", "dist", "test", "docs"],
    "package": "./package.json",
    "plugins": [
        {"name": "esdoc-standard-plugin"},
        {"name": "esdoc-ecmascript-proposal-plugin", "option": {"all": true}},
        {"name": "esdoc-react-plugin"},
        {"name": "esdoc-jsx-plugin"}
    ]
}

Babel supports this syntax from version 7 onwards, yet it seems ESDoc fails to recognize it.
Other react components not containing this syntax do parse and generate docs without issue.

@Lythenas
Copy link

Lythenas commented Mar 6, 2019

I can confirm this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants