title: How to resolve the no-undef error for setTimeout
body: <p>My code </p>
  
  <pre><code>  componentDidMount() {
      // we add a hidden class to the card and after 700 ms we delete it and the transition appears
      this.timeOutFunction = setTimeout(
        function () {
          this.setState({cardAnimaton: ""});
        }.bind(this),
        700
      );
    }
  
    componentWillUnmount() {
      clearTimeout(this.timeOutFunction);
      this.timeOutFunction = null;
    }
  
    componentWillMount() {
      if (this.state.logged_in) {
        this.props.history.push("/dashboard");
      }
    }
  </code></pre>
  
  <p>I turned on the following in my <code>.eslintrc</code></p>
  
  <pre><code>{
      "parser": "babel-eslint",
      "plugins": [
          "react"
      ],
      "extends": [
          "eslint:recommended",
          "plugin:react/recommended"
      ],
      "rules": {
         "no-set-state": "off",
         "react/no-multi-comp":  [1, { "ignoreStateless": true }]
      },
  
      "parserOptions": {
        "ecmaVersion": 6,
        "sourceType": "module",
        "ecmaFeatures": {
            "jsx": true,
            "modules": true
        }
    },
    "globals": {
      "localStorage": true,
      "fetch": true
  },
    "settings": {
      "react": {
          "pragma": "React",
          "version": "16.4.1"
      }
      }
  }
  </code></pre>
  
  <p>And I get the following warnings</p>
  
  <pre><code>setTimeout is not defined (no-undef)
  clearTimeout is not defined (no-undef)
  </code></pre>
  
  <p>How do I resolve this warning?</p>