Bug 1691821 - [1.b.3] Adjust build files to support the new autofill component. r=zbraniecki,dimi

Differential Revision: https://phabricator.services.mozilla.com/D110271
This commit is contained in:
Eugen Sawin 2021-04-09 22:12:11 +00:00
Родитель 977412fe4b
Коммит aed549aaa5
6 изменённых файлов: 106 добавлений и 5 удалений

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

@ -3,9 +3,5 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
[features/formautofill@mozilla.org] chrome.jar:
res/ (*.jsm)
res/phonenumberutils/ (phonenumberutils/*.jsm)
res/addressmetadata/ (addressmetadata/*)
content/ (content/*)
content/skin/ (skin/shared/*)

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

@ -0,0 +1,85 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
module.exports = {
rules: {
// Rules from the mozilla plugin
"mozilla/balanced-listeners": "error",
"mozilla/no-aArgs": "error",
"mozilla/var-only-at-top-level": "error",
"valid-jsdoc": [
"error",
{
prefer: {
return: "returns",
},
preferType: {
Boolean: "boolean",
Number: "number",
String: "string",
bool: "boolean",
},
requireParamDescription: false,
requireReturn: false,
requireReturnDescription: false,
},
],
// No expressions where a statement is expected
"no-unused-expressions": "error",
// No declaring variables that are never used
"no-unused-vars": [
"error",
{
args: "none",
vars: "all",
},
],
// No using variables before defined
"no-use-before-define": "error",
// Disallow using variables outside the blocks they are defined (especially
// since only let and const are used, see "no-var").
"block-scoped-var": "error",
// Warn about cyclomatic complexity in functions.
complexity: ["error", { max: 26 }],
// Maximum depth callbacks can be nested.
"max-nested-callbacks": ["error", 4],
// Disallow using the console API.
"no-console": "error",
// Disallow fallthrough of case statements, except if there is a comment.
"no-fallthrough": "error",
// Disallow use of multiline strings (use template strings instead).
"no-multi-str": "error",
// Disallow usage of __proto__ property.
"no-proto": "error",
// Disallow use of assignment in return statement. It is preferable for a
// single line of code to have only one easily predictable effect.
"no-return-assign": "error",
// Require use of the second argument for parseInt().
radix: "error",
// Require "use strict" to be defined globally in the script.
strict: ["error", "global"],
// Disallow Yoda conditions (where literal value comes first).
yoda: "error",
// Disallow function or variable declarations in nested blocks
"no-inner-declarations": "error",
},
};

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

@ -0,0 +1,9 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
toolkit.jar:
% resource autofill %res/autofill/
res/autofill/ (./*.jsm)
res/autofill/phonenumberutils/ (./phonenumberutils/*.jsm)
res/autofill/addressmetadata/ (./addressmetadata/*)

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

@ -0,0 +1,10 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ["jar.mn"]
with Files("**"):
BUG_COMPONENT = ("Toolkit", "Form Autofill")

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

@ -37,6 +37,7 @@ DIRS += [
"enterprisepolicies",
"extensions",
"featuregates",
"formautofill",
"filewatcher",
"finalizationwitness",
"find",

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

@ -64,7 +64,6 @@ avoid-blacklist-and-whitelist:
- browser/components/urlbar/tests/unit/test_providerHeuristicFallback.js
- browser/components/urlbar/tests/unit/test_search_suggestions.js
- browser/components/urlbar/tests/unit/test_tokenizer.js
- browser/extensions/formautofill/FormAutofillSync.jsm
- browser/extensions/screenshots/background/main.js
- browser/modules/SitePermissions.jsm
- browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm
@ -348,6 +347,7 @@ avoid-blacklist-and-whitelist:
- toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
- toolkit/components/extensions/Extension.jsm
- toolkit/components/extensions/test/xpcshell/test_WebExtensionPolicy.js
- toolkit/components/formautofill/FormAutofillSync.jsm
- toolkit/components/remotepagemanager/RemotePageManagerParent.jsm
- toolkit/components/reputationservice/ApplicationReputation.cpp
- toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.h