segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.38k stars 830 forks source link

Doc site can't parse Pane.tsx #1607

Closed brandongregoryscott closed 1 year ago

brandongregoryscott commented 1 year ago

Looks like we'll need to tweak the doc site setup now that the Pane component is a typescript file (error can be observed when running yarn build in the docs directory)

There was an error parsing component documentation SyntaxError: unknown: Unexpected token (16:2)

  14 |    * Can be an explicit border value or a boolean.
  15 |    */
> 16 |   border?: boolean | string
     |   ^
  17 |
  18 |   /**
  19 |    * Can be an explicit border value or a boolean.
    at _temp._raise (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:775:17)
    at _temp.raiseWithData (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:768:17)
    at _temp.raise (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:736:17)
    at _temp.unexpected (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:9699:16)
    at _temp.flowObjectTypeSemicolon (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:2476:14)
    at _temp.flowParseObjectType (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:2358:14)
    at _temp.flowParseInterfaceish (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:1964:24)
    at _temp.flowParseInterface (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:1987:12)
    at _temp.parseExportDeclaration (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:3194:21)
    at _temp.maybeParseExportDeclaration (/Users/brandon.scott/oss/origin/evergreen/docs/node_modules/@babel/parser/lib/index.js:13376:31) {
  loc: Position { line: 16, column: 2 },
  pos: 413,
  code: 'BABEL_PARSE_ERROR'
}