mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1230093 - Make the import-headjs-globals rule store variables correctly; r=Mossop
This commit is contained in:
parent
ba0deaa3cd
commit
2c7f2d2f7d
@ -254,9 +254,8 @@
|
||||
// Disallow trailing whitespace at the end of lines.
|
||||
"no-trailing-spaces": 2,
|
||||
// Disallow use of undeclared variables unless mentioned in a /*global */
|
||||
// block.
|
||||
// This should really be a 2, but until we define all globals in comments
|
||||
// and .eslintrc, keeping this as a 1.
|
||||
// block. Note that globals from head.js are automatically imported in tests
|
||||
// by the import-headjs-globals rule form the mozilla eslint plugin.
|
||||
"no-undef": 2,
|
||||
// Allow dangling underscores in identifiers (for privates).
|
||||
"no-underscore-dangle": 0,
|
||||
|
@ -129,6 +129,13 @@ module.exports = {
|
||||
variable.eslintExplicitGlobal = false;
|
||||
variable.writeable = true;
|
||||
variables.push(variable);
|
||||
|
||||
// Since eslint 1.10.3, scope variables are now duplicated in the scope.set
|
||||
// map, so we need to store them there too if it exists.
|
||||
// See https://groups.google.com/forum/#!msg/eslint/Y4_oHMWwP-o/5S57U8jXd8kJ
|
||||
if (scope.set) {
|
||||
scope.set.set(name, variable);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user