esdoc-plugins icon indicating copy to clipboard operation
esdoc-plugins copied to clipboard

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

Open karanbajaj2209 opened this issue 8 years ago • 2 comments

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 avatar Oct 11 '17 00:10 karanbajaj2209

Working configuration for me:

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

Ziv-Barber avatar Oct 12 '18 16:10 Ziv-Barber

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

michaelmior avatar Jun 12 '19 16:06 michaelmior