Issue 1:
💻

Would you like to work on a fix?

How are you using Babel?

Other (Next.js, Gatsby, vue-cli, ...)

Input code

var [ x , x ] = [ 0 , , ] ;

Configuration file name

No response

Configuration

No response

Current and expected behavior

x is expected to be undefined but it is 0 in the transpiled code.

// transpiled code
"use strict";

var x = 0,
x;

Environment

Reproduction on Babel's own REPL

Possible solution

No response

Additional context

No response

Issue 2:
I followed the instructions for typescript on this page: https://babeljs.io/docs/en/babel-preset-typescript

And ended up with a .babelrc file:

{
"presets": ["@babel/preset-typescript"],
"isTSX": true,
"allExtensions": true
}

babel setup (inside gatsby):

─ @babel/cli@7.4.4
├─ @babel/code-frame@7.0.0
├─ @babel/core@7.4.5
├─ @babel/generator@7.4.4
├─ @babel/helper-annotate-as-pure@7.0.0
├─ @babel/helper-builder-binary-assignment-operator-visitor@7.1.0
├─ @babel/helper-builder-react-jsx@7.3.0
├─ @babel/helper-call-delegate@7.4.4
├─ @babel/helper-create-class-features-plugin@7.4.4
├─ @babel/helper-define-map@7.4.4
├─ @babel/helper-explode-assignable-expression@7.1.0
├─ @babel/helper-function-name@7.1.0
├─ @babel/helper-get-function-arity@7.0.0
├─ @babel/helper-hoist-variables@7.4.4
├─ @babel/helper-member-expression-to-functions@7.0.0
├─ @babel/helper-module-imports@7.0.0
├─ @babel/helper-module-transforms@7.4.4
├─ @babel/helper-optimise-call-expression@7.0.0
├─ @babel/helper-plugin-utils@7.0.0
├─ @babel/helper-regex@7.4.4
├─ @babel/helper-remap-async-to-generator@7.1.0
├─ @babel/helper-replace-supers@7.4.4
├─ @babel/helper-simple-access@7.1.0
├─ @babel/helper-split-export-declaration@7.4.4
├─ @babel/helper-wrap-function@7.2.0
├─ @babel/helpers@7.4.4
├─ @babel/highlight@7.0.0
├─ @babel/node@7.4.5
├─ @babel/parser@7.4.5
├─ @babel/plugin-proposal-async-generator-functions@7.2.0
├─ @babel/plugin-proposal-class-properties@7.4.4
├─ @babel/plugin-proposal-json-strings@7.2.0
├─ @babel/plugin-proposal-object-rest-spread@7.4.4
├─ @babel/plugin-proposal-optional-catch-binding@7.2.0
├─ @babel/plugin-proposal-unicode-property-regex@7.4.4
├─ @babel/plugin-syntax-async-generators@7.2.0
├─ @babel/plugin-syntax-class-properties@7.2.0
├─ @babel/plugin-syntax-dynamic-import@7.2.0
├─ @babel/plugin-syntax-flow@7.2.0
├─ @babel/plugin-syntax-json-strings@7.2.0
├─ @babel/plugin-syntax-jsx@7.2.0
├─ @babel/plugin-syntax-object-rest-spread@7.2.0
├─ @babel/plugin-syntax-optional-catch-binding@7.2.0
├─ @babel/plugin-syntax-typescript@7.3.3
├─ @babel/plugin-transform-arrow-functions@7.2.0
├─ @babel/plugin-transform-async-to-generator@7.4.4
├─ @babel/plugin-transform-block-scoped-functions@7.2.0
├─ @babel/plugin-transform-block-scoping@7.4.4
├─ @babel/plugin-transform-classes@7.4.4
├─ @babel/plugin-transform-computed-properties@7.2.0
├─ @babel/plugin-transform-destructuring@7.4.4
├─ @babel/plugin-transform-dotall-regex@7.4.4
├─ @babel/plugin-transform-duplicate-keys@7.2.0
├─ @babel/plugin-transform-exponentiation-operator@7.2.0
├─ @babel/plugin-transform-flow-strip-types@7.4.4
├─ @babel/plugin-transform-for-of@7.4.4
├─ @babel/plugin-transform-function-name@7.4.4
├─ @babel/plugin-transform-literals@7.2.0
├─ @babel/plugin-transform-member-expression-literals@7.2.0
├─ @babel/plugin-transform-modules-amd@7.2.0
├─ @babel/plugin-transform-modules-commonjs@7.4.4
├─ @babel/plugin-transform-modules-systemjs@7.4.4
├─ @babel/plugin-transform-modules-umd@7.2.0
├─ @babel/plugin-transform-named-capturing-groups-regex@7.4.5
├─ @babel/plugin-transform-new-target@7.4.4
├─ @babel/plugin-transform-object-super@7.2.0
├─ @babel/plugin-transform-parameters@7.4.4
├─ @babel/plugin-transform-property-literals@7.2.0
├─ @babel/plugin-transform-react-display-name@7.2.0
├─ @babel/plugin-transform-react-jsx-self@7.2.0
├─ @babel/plugin-transform-react-jsx-source@7.2.0
├─ @babel/plugin-transform-react-jsx@7.3.0
├─ @babel/plugin-transform-regenerator@7.4.5
├─ @babel/plugin-transform-reserved-words@7.2.0
├─ @babel/plugin-transform-runtime@7.4.4
├─ @babel/plugin-transform-shorthand-properties@7.2.0
├─ @babel/plugin-transform-spread@7.2.2
├─ @babel/plugin-transform-sticky-regex@7.2.0
├─ @babel/plugin-transform-template-literals@7.4.4
├─ @babel/plugin-transform-typeof-symbol@7.2.0
├─ @babel/plugin-transform-typescript@7.4.5
├─ @babel/plugin-transform-unicode-regex@7.4.4
├─ @babel/polyfill@7.4.4
├─ @babel/preset-env@7.4.5
├─ @babel/preset-react@7.0.0
├─ @babel/preset-typescript@7.3.3
├─ @babel/register@7.4.4
├─ @babel/runtime@7.4.5
├─ @babel/template@7.4.4
├─ @babel/traverse@7.4.5
└─ @babel/types@7.4.4

Error Message:

error There was a problem parsing component

ReferenceError: Unknown option: .isTSX. Chec
k out https://babeljs.io/docs/en/babel-core/
#options for more information about options.

- options.js:123 throwUnknownError
[components-documentation]/[@babel]/core/l
ib/config/validation/options.js:123:11

- options.js:107 Object.keys.forEach.key
[components-documentation]/[@babel]/core/l
ib/config/validation/options.js:107:5

- Array.forEach

- options.js:83 validateNested
[components-documentation]/[@babel]/core/l
ib/config/validation/options.js:83:21

- options.js:74 validate
[components-documentation]/[@babel]/core/l
ib/config/validation/options.js:74:10

- config-chain.js:174 file
[components-documentation]/[@babel]/core/l
ib/config/config-chain.js:174:34

- caching.js:33 cachedFunction
[components-documentation]/[@babel]/core/l
ib/config/caching.js:33:19

- config-chain.js:120 buildRootChain
[components-documentation]/[@babel]/core/l
ib/config/config-chain.js:120:36

- partial.js:85 loadPrivatePartialConfig
[components-documentation]/[@babel]/core/l
ib/config/partial.js:85:55

- partial.js:110 Object.loadPartialConfig
[components-documentation]/[@babel]/core/l
ib/config/partial.js:110:18

- babelParser.js:44 buildOptions
[components-documentation]/[react-docgen]/
dist/babelParser.js:44:31

- babelParser.js:62 buildParse
[components-documentation]/[react-docgen]/

Techstack:

gatsby-transformer-react-docgen

react-docgen

@babel/*