ESLint no-use-before-define

Rule disabled for function and classes declarations

"rules": {    
  "no-use-before-define": ["error", {"functions": false, "classes": false}]
}

It looks like you might be interested in the variables option, for this rule. You can read about that option here.

This flag determines whether or not the rule checks variable declarations in upper scopes. If this is true, the rule warns every reference to a variable before the variable declaration. Otherwise, the rule ignores a reference if the declaration is in an upper scope, while still reporting the reference if it's in the same scope as the declaration.

You might configure it, in your .eslintrc, like so ...

{
  "no-use-before-define": ["error", { "variables": false }]
}

This will keep that rule enabled for other things, such as classes and functions and variables in the same scope, but will relax it for variables in upper scopes.


Before the render line, do this:

// eslint-disable-next-line no-use-before-define

See the eslint docs.