зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1294618 - Enable the computed-property-spacing rule for eslint. r=felipe
MozReview-Commit-ID: IaN54BFBksA
This commit is contained in:
Родитель
b82aa6f6de
Коммит
8ba24fd3a9
|
@ -21,7 +21,7 @@
|
||||||
// "comma-style": 2,
|
// "comma-style": 2,
|
||||||
|
|
||||||
// Don't require spaces around computed properties
|
// Don't require spaces around computed properties
|
||||||
// "computed-property-spacing": [2, "never"],
|
"computed-property-spacing": [2, "never"],
|
||||||
|
|
||||||
// Functions must always return something or nothing
|
// Functions must always return something or nothing
|
||||||
"consistent-return": 2,
|
"consistent-return": 2,
|
||||||
|
|
|
@ -363,7 +363,7 @@ Preference.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
set locked(aValue) {
|
set locked(aValue) {
|
||||||
this.branch._prefs[ aValue ? "lockPref" : "unlockPref" ](this.name);
|
this.branch._prefs[aValue ? "lockPref" : "unlockPref"](this.name);
|
||||||
},
|
},
|
||||||
|
|
||||||
get modified() {
|
get modified() {
|
||||||
|
|
|
@ -54,11 +54,11 @@ function initDialog()
|
||||||
|
|
||||||
gDialog.enabled = false;
|
gDialog.enabled = false;
|
||||||
|
|
||||||
gDialog.strings = new Array;
|
gDialog.strings = new Array;
|
||||||
gDialog.strings[ "marginUnits.inches" ] = document.getElementById("marginUnits.inches").childNodes[0].nodeValue;
|
gDialog.strings["marginUnits.inches"] = document.getElementById("marginUnits.inches").childNodes[0].nodeValue;
|
||||||
gDialog.strings[ "marginUnits.metric" ] = document.getElementById("marginUnits.metric").childNodes[0].nodeValue;
|
gDialog.strings["marginUnits.metric"] = document.getElementById("marginUnits.metric").childNodes[0].nodeValue;
|
||||||
gDialog.strings[ "customPrompt.title" ] = document.getElementById("customPrompt.title").childNodes[0].nodeValue;
|
gDialog.strings["customPrompt.title"] = document.getElementById("customPrompt.title").childNodes[0].nodeValue;
|
||||||
gDialog.strings[ "customPrompt.prompt" ] = document.getElementById("customPrompt.prompt").childNodes[0].nodeValue;
|
gDialog.strings["customPrompt.prompt"] = document.getElementById("customPrompt.prompt").childNodes[0].nodeValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,10 +159,10 @@ function customize( node )
|
||||||
{
|
{
|
||||||
// If selection is now "Custom..." then prompt user for custom setting.
|
// If selection is now "Custom..." then prompt user for custom setting.
|
||||||
if ( node.value == 6 ) {
|
if ( node.value == 6 ) {
|
||||||
var prompter = Components.classes[ "@mozilla.org/embedcomp/prompt-service;1" ]
|
var prompter = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||||
.getService( Components.interfaces.nsIPromptService );
|
.getService( Components.interfaces.nsIPromptService );
|
||||||
var title = gDialog.strings[ "customPrompt.title" ];
|
var title = gDialog.strings["customPrompt.title"];
|
||||||
var promptText = gDialog.strings[ "customPrompt.prompt" ];
|
var promptText = gDialog.strings["customPrompt.prompt"];
|
||||||
var result = { value: node.custom };
|
var result = { value: node.custom };
|
||||||
var ok = prompter.prompt(window, title, promptText, result, null, { value: false } );
|
var ok = prompter.prompt(window, title, promptText, result, null, { value: false } );
|
||||||
if ( ok ) {
|
if ( ok ) {
|
||||||
|
@ -185,11 +185,11 @@ function setHeaderFooter( node, value )
|
||||||
}
|
}
|
||||||
|
|
||||||
var gHFValues = new Array;
|
var gHFValues = new Array;
|
||||||
gHFValues[ "&T" ] = 1;
|
gHFValues["&T"] = 1;
|
||||||
gHFValues[ "&U" ] = 2;
|
gHFValues["&U"] = 2;
|
||||||
gHFValues[ "&D" ] = 3;
|
gHFValues["&D"] = 3;
|
||||||
gHFValues[ "&P" ] = 4;
|
gHFValues["&P"] = 4;
|
||||||
gHFValues[ "&PT" ] = 5;
|
gHFValues["&PT"] = 5;
|
||||||
|
|
||||||
function hfValueToId(val)
|
function hfValueToId(val)
|
||||||
{
|
{
|
||||||
|
|
|
@ -180,14 +180,14 @@ function getString( stringId ) {
|
||||||
elem.childNodes[0]
|
elem.childNodes[0]
|
||||||
&&
|
&&
|
||||||
elem.childNodes[0].nodeValue ) {
|
elem.childNodes[0].nodeValue ) {
|
||||||
dialog.strings[ stringId ] = elem.childNodes[0].nodeValue;
|
dialog.strings[stringId] = elem.childNodes[0].nodeValue;
|
||||||
} else {
|
} else {
|
||||||
// If unable to fetch string, use an empty string.
|
// If unable to fetch string, use an empty string.
|
||||||
dialog.strings[ stringId ] = "";
|
dialog.strings[stringId] = "";
|
||||||
}
|
}
|
||||||
} catch (e) { dialog.strings[ stringId ] = ""; }
|
} catch (e) { dialog.strings[stringId] = ""; }
|
||||||
}
|
}
|
||||||
return dialog.strings[ stringId ];
|
return dialog.strings[stringId];
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadDialog()
|
function loadDialog()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче