esdoc / esdoc-plugins

MIT License
139 stars 74 forks source link

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

Open karanbajaj2209 opened 7 years ago

karanbajaj2209 commented 7 years ago
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}
    }
  ]
}
Ziv-Barber commented 6 years ago

Working configuration for me:

    {
      "name": "esdoc-ecmascript-proposal-plugin",
      "option": {
        "all": true
      }
    },
    {
      "name": "esdoc-react-plugin"
    },
    {
      "name": "esdoc-jsx-plugin"
    }
michaelmior commented 5 years ago

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