Add no-use-before-define to debug-fb-www script

Summary:
Release notes: none

This adds the `no-use-before-define` rule to `debug-fb-www` script. `variables` and `functions` are set to false, which allows them to be skipped if defined in a parent scope or if the function is in the same scope (as it gets hoisted), see: https://github.com/eslint/eslint/pull/7948/files. With our current internal bundle and latest master, this brings about a new error that wasn't previously emitted: `'_$Fg' was used before it was defined. (5525:15)`.  Fixes https://github.com/facebook/prepack/issues/1982
Closes https://github.com/facebook/prepack/pull/1984

Differential Revision: D8055274

Pulled By: trueadm

fbshipit-source-id: 93a672dd22bce8cd798ebbb7ed90536a847f9ecb
This commit is contained in:
Dominic Gannaway 2018-05-18 02:11:58 -07:00 committed by Facebook Github Bot
parent 21cb2b4da5
commit 4dda80e5be

View File

@ -117,7 +117,10 @@ function lintCompiledSource(source) {
commonjs: true,
browser: true,
},
rules: { "no-undef": "error" },
rules: {
"no-undef": "error",
"no-use-before-define": ["error", { variables: false, functions: false }],
},
parserOptions: {
ecmaVersion: 6,
ecmaFeatures: {