Bug 1338075 - formautofill: Enable object-shorthand. r=lchang

MozReview-Commit-ID: 1y2B2jxmsaC

--HG--
extra : rebase_source : 34c0854b5816608e3a5fed673a08ab74555a0b0a
This commit is contained in:
Matthew Noorenberghe 2017-02-09 16:28:56 +08:00
Родитель 1465414fd0
Коммит dfc778070c
5 изменённых файлов: 7 добавлений и 12 удалений

Просмотреть файл

@ -265,11 +265,6 @@ module.exports = { // eslint-disable-line no-undef
// Allow using TODO/FIXME comments.
"no-warning-comments": "off",
// Don't require method and property shorthand syntax for object literals.
// We use this in the code a lot, but not consistently, and this seems more
// like something to check at code review time.
"object-shorthand": "off",
// Allow more than one variable declaration per function.
"one-var": "off",

Просмотреть файл

@ -46,7 +46,7 @@ let FormAutofillParent = {
/**
* Initializes ProfileStorage and registers the message handler.
*/
init: function() {
init() {
let storePath =
OS.Path.join(OS.Constants.Path.profileDir, PROFILE_JSON_FILE_NAME);
@ -66,7 +66,7 @@ let FormAutofillParent = {
* @param {object} message.data The data of the message.
* @param {nsIFrameMessageManager} message.target Caller's message manager.
*/
receiveMessage: function({name, data, target}) {
receiveMessage({name, data, target}) {
switch (name) {
case "FormAutofill:PopulateFieldValues":
this._populateFieldValues(data, target);
@ -84,7 +84,7 @@ let FormAutofillParent = {
*
* @returns {ProfileStorage}
*/
getProfileStore: function() {
getProfileStore() {
return this._profileStore;
},
@ -93,7 +93,7 @@ let FormAutofillParent = {
*
* @private
*/
_uninit: function() {
_uninit() {
if (this._profileStore) {
this._profileStore._saveImmediately();
this._profileStore = null;

Просмотреть файл

@ -39,7 +39,7 @@ let gFileCounter = Math.floor(Math.random() * 1000000);
function loadFormAutofillContent() {
let facGlobal = {
addEventListener: function() {},
addEventListener() {},
};
let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Ci.mozIJSSubScriptLoader);

Просмотреть файл

@ -64,7 +64,7 @@ add_task(function* test_populateFieldValues() {
fields: TEST_FIELDS,
},
target: {
sendAsyncMessage: function(name, data) {
sendAsyncMessage(name, data) {
do_check_eq(name, "FormAutofill:fillForm");
let fields = data.fields;

Просмотреть файл

@ -16,7 +16,7 @@ let matchingProfiles = [{
let testCases = [{
options: {},
matchingProfiles: matchingProfiles,
matchingProfiles,
searchString: "",
fieldName: "",
expected: {