mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
4c45c258f1
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
13 lines
202 B
Plaintext
13 lines
202 B
Plaintext
{
|
|
// When adding items to this file please check for effects on sub-directories.
|
|
"plugins": [
|
|
"mozilla"
|
|
],
|
|
"rules": {
|
|
"mozilla/import-globals": 1,
|
|
},
|
|
"env": {
|
|
"es6": true
|
|
},
|
|
}
|