Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support Flow component syntax

Open
#1,644 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
babel, javascript
Domain
tooling

Research direction

Reproduce the failure with npx documentation build ./Example.js --shallow using the Flow component syntax shown, then trace how the CLI invokes @babel/parser. Done means the example parses without the “Missing semicolon” error and produces the expected flow tag in the output.

Written by the indexing model from the issue text.

Description

Version: [email protected]
Usage: CLI - npx documentation build ./Example.js --shallow
Docs: https://flow.org/en/docs/react/component-syntax/

Code
/** @flow */

component Example( text: string = 'Hello World' ) {
	return <div>{text}</div>;
};
Expected
[
  {
    "description": "",
    "tags": [
      {
        "title": "flow",
        "description": null,
        "lineNumber": 0
      }
    ]
    ...
]
Actual
SyntaxError: Missing semicolon. (3:9)
    at constructor (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:362:19)
    at V8IntrinsicMixin.raise (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:3260:19)
    at V8IntrinsicMixin.semicolon (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:3586:10)
    at V8IntrinsicMixin.parseExpressionStatement (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:12761:10)
    at V8IntrinsicMixin.parseExpressionStatement (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:5073:18)
    at V8IntrinsicMixin.parseStatementContent (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:12376:19)
    at V8IntrinsicMixin.parseStatementLike (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:12239:17)
    at V8IntrinsicMixin.parseStatementLike (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:5051:24)
    at V8IntrinsicMixin.parseModuleItem (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:12216:17)
    at V8IntrinsicMixin.parseBlockOrModuleBlockBody (/home/anttis/Dev/LianaUI/node_modules/@babel/parser/lib/index.js:12792:36)
Dominant language
JavaScript
Stars
5.8k
Forks
479
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from documentationjs/documentation

All issues in documentationjs/documentation

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.