strothj / babel-plugin-react-docgen-typescript

Babel Plugin to generate docgen data from React components written in TypeScript.
12 stars 4 forks source link

fix: add quotation marks to props properties #1

Closed yehq closed 5 years ago

yehq commented 5 years ago

I encountered a problem

Module parse failed: Unexpected token (696:10)
You may need an appropriate loader to handle this file type.
|         }
|       },
>       aria-activedescendant: {
|         "defaultValue": null,
|         "description": "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",

add extra babel plugin like

['react-docgen-typescript', {
    propFilter: (prop, component) => {
        if (prop.parent) {
            return !prop.parent.fileName.includes('node_modules');
        }
        return true;
    },
    include: "components.*\\.tsx$",
}],
strothj commented 5 years ago

Hello,

I've merge in your changes and published as 1.1.0.

yehq commented 5 years ago

Hello,

I've merge in your changes and published as 1.1.0.

Thanks