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

ESDoc not able to generate documentation if render method has a JSX comment #34

Open
karanbajaj2209 opened this issue Oct 11, 2017 · 2 comments

Comments

@karanbajaj2209
Copy link

karanbajaj2209 commented Oct 11, 2017

Hello,

I am not able to create documentation for the React render method if it contains a JSX comment.

=== JSX comment example ===
{/* Test Coment */}

Is there any configuration by which I can ignore these comments and generate comments for the render method?

=== Render method example ===
/**
* render is a react lifecycle method.
* @access private
* @return {ReactElement} HTML
*/
render () {
        let _this = this;
        return (
            <div>
                {/* Test Coment */}
             </div>
        )
}

=== ESDOC json config file ===
{
  "source": "..",
  "destination": "docs",
  "includes": ["\\.(js|jsx)$"],
  "plugins": [
    {
      "name": "esdoc-standard-plugin",
      "option": {
        "lint": {"enable": false},
        "coverage": {"enable": true},
        "accessor": {
          "access": ["public", "protected"],
          "autoPrivate" : false
        },
        "undocumentIdentifier" : {"enable": false},
        "typeInference": {"enable": true},
      }
    },
    {
      "name": "esdoc-jsx-plugin", 
      "option": {"enable": true}
    },
    {
      "name": "esdoc-react-plugin", 
      "option": {"enable": true}
    },
    {
      "name": "esdoc-lint-plugin",
      "option": {"enable": true}
    }
  ]
}

@karanbajaj2209 karanbajaj2209 changed the title ESDoc able to document if render method has JSX comment ESDoc not able to generate documentation if render method has a JSX comment Oct 11, 2017
@Ziv-Barber
Copy link

Working configuration for me:

    {
      "name": "esdoc-ecmascript-proposal-plugin",
      "option": {
        "all": true
      }
    },
    {
      "name": "esdoc-react-plugin"
    },
    {
      "name": "esdoc-jsx-plugin"
    }

@michaelmior
Copy link

Works for me too (with the added JSX plugin.)

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

3 participants