зеркало из https://github.com/mozilla/gecko-dev.git
56d83fc4bd
While working on turning on no-undef I discovered that the various rules we have for defining globals are a little inconsistent in whether the files they load recurse through import-globals-from directives and none of them imported eslint globals directives. I think we're better off putting all this global parsing code in a single place rather than spread across multiple rules. Have one rule to turn it on for parsed files and one function to load globals from other files and make them share most of the code so we won't get inconsistent. If we find us needing to turn on/off individual features we can figure out a way to do that in the future. This patch does that, the globals.js file does all global parsing with a shared object that receives events from the AST, either through from an ESlint rule or from a simple AST walker using estraverse. MozReview-Commit-ID: 9KQZwsNNOUl --HG-- extra : rebase_source : 0f1cceca29ac398be97a55bbcd09fe58a8be1435 extra : source : 878db4caf845282f06542793bc4b5c24fa658c14 |
||
---|---|---|
.. | ||
balanced-listeners.rst | ||
import-browserjs-globals.rst | ||
import-globals.rst | ||
import-headjs-globals.rst | ||
index.rst | ||
mark-test-function-used.rst | ||
no-aArgs.rst | ||
no-cpows-in-tests.rst | ||
reject-importGlobalProperties.rst | ||
var-only-at-top-level.rst |