mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-09-11 14:46:37 +03:00
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:
parent
21cb2b4da5
commit
4dda80e5be
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user