title: ESLint validate JSX file
body: <p>I use ESLint to check my react code. However, it cannot identify the variable in react component tag. ESLint throw the error 'no-unused-vars' to me(the variable 'Comp'). But I have been used this variable in my code</p>
  
  <pre><code>export function TestHoc() {
      return function (Comp) {
          class testHocComponent extends PureComponent{
              render(){
                  const props={
                      'x':1,
                      'y':2,
                      'z':3
                  };
  
                  return (
                      &lt;Comp {...props}/&gt;
                  );
              }
          }
          return testHocComponent;
      };
  }
  </code></pre>
  
  <p>And here is the configuration of my ESLint</p>
  
  <pre><code>"env": {
      "browser": true,
      "commonjs": true,
      "es6": true,
      "node": true
  },
  "parserOptions": {
      "ecmaVersion": 6,
      "ecmaFeatures": {
          "experimentalObjectRestSpread": true,
          "jsx": true,
          "arrowFunctions": true,
          "classes": true,
          "modules": true,
          "defaultParams": true
      },
      "sourceType": "module"
  },
  "parser": "babel-eslint",
  "plugins": [
      "react"
  ],
  </code></pre>