Backed out 3 changesets (bug 1825715) for causing node failures with checkBundles CLOSED TREE

Backed out changeset 53faa883781a (bug 1825715)
Backed out changeset 5ce3ad6ce483 (bug 1825715)
Backed out changeset 7f0b08e89cd1 (bug 1825715)
This commit is contained in:
Cristian Tuns 2023-03-31 17:23:28 -04:00
Родитель 68be807d92
Коммит 8cca7e0d9f
19 изменённых файлов: 54 добавлений и 46 удалений

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

@ -1155,7 +1155,8 @@ export class ASRouterAdminInner extends React.PureComponent {
>
Unblock All Snippets
</button>
Show messages from
{/* eslint-disable-next-line prettier/prettier */}
Show messages from {/* eslint-disable-next-line jsx-a11y/no-onchange */}
<select
value={this.state.messageFilter}
onChange={this.onChangeMessageFilter}

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

@ -41,6 +41,7 @@ export class Dropdown extends Component {
renderButton() {
return (
// eslint-disable-next-line prettier/prettier
<button className="dropdown-button" onClick={this.toggleDropdown}>
{this.props.icon}
</button>

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

@ -23,7 +23,7 @@ See the `Usage guide`_ for more options.
Understanding Rules and Errors
------------------------------
* Only some files are linted, see the :searchfox:`configuration <tools/lint/eslint.yml>` for details.
* Only some files are linted, see the `configuration`_ for details.
* By design we do not lint/format reftests not crashtests as these are specially crafted tests.
@ -55,8 +55,6 @@ I am getting a linter error "Unknown Services member property"
Make sure to add any new Services to ``tools/lint/eslint/eslint-plugin-mozilla/lib/services.json``. For example by copying from
``<objdir>/xpcom/components/services.json`` after a build.
.. _adding-tests:
I'm adding tests, how do I set up the right configuration?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -91,33 +89,20 @@ I'm using an ES module
* If it is a system module (e.g. component definition or other non-frontend code),
use a ``.sys.mjs`` extension.
This code should neither be linted nor formatted
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This code shouldn't be linted
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* If it is a third-party piece of code, please add it to :searchfox:`ThirdPartyPaths.txt <tools/rewriting/ThirdPartyPaths.txt>`.
* If it is a generated file, please add it to :searchfox:`Generated.txt <tools/rewriting/Generated.txt>`.
* If intentionally invalid, please add it to :searchfox:`.eslintignore <.eslintignore>`.
This code shouldn't be formatted
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The vast majority of code should be formatted, however we allow some limited
cases where it makes sense, for example:
* A table in an array where laying it out in a table fashion makes it more readable.
* Other structures or function calls where layout is more readable in a particular format.
To disable prettier for code like this, ``// prettier-ignore`` may be used on
the line previous to where you want it disabled.
See the `prettier ignore docs`_ for more information.
* If it is a third-party piece of code, please add it to `ThirdPartyPaths.txt`_.
* If it is pre-generated file or intentionally invalid, please add it to `.eslintignore`_
I have valid code that is failing the ``no-undef`` rule or can't be parsed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Please do not add this to :searchfox:`.eslintignore <.eslintignore>`. Generally
this can be fixed, if the following tips don't help, please `seek help`_.
* If you are adding a new test directory, see the :ref:`section above <adding-tests>`
* Please do not add this to `.eslintignore`_. Generally this can be fixed, if the following
tips don't help, please `seek help`_.
* If you are adding a new test directory, make sure its name matches one of the
`patterns in .eslintrc.js`_. If you really can't match those, then you may need
to add a separate `test specific .eslintrc.js file (example)`_.
* If you are writing a script loaded into special environment (e.g. frame script) you may need to tell ESLint to use the `environment definitions`_ for each case:
* ``/* eslint-env mozilla/frame-script */``
@ -144,8 +129,8 @@ make it easier for developers.
Sources
-------
* :searchfox:`Configuration (YAML) <tools/lint/eslint.yml>`
* :searchfox:`Source <tools/lint/eslint/__init__.py>`
* `Configuration (YAML)`_
* `Source`_
Builders
--------
@ -199,13 +184,18 @@ For test harness issues, file bugs in Developer Infrastructure :: Lint and Forma
.. _Prettier: https://prettier.io/
.. _Usage guide: ../usage.html
.. _ESLint's documentation: http://eslint.org/docs/user-guide/configuring
.. _configuration: https://searchfox.org/mozilla-central/source/tools/lint/eslint.yml
.. _eslint.org's rule list: http://eslint.org/docs/rules/
.. _eslint-plugin-mozilla: eslint-plugin-mozilla.html
.. _eslint-plugin-spidermonkey-js: eslint-plugin-spidermonkey-js.html
.. _ThirdPartyPaths.txt: https://searchfox.org/mozilla-central/source/tools/rewriting/ThirdPartyPaths.txt
.. _informed that it is a module: https://searchfox.org/mozilla-central/rev/9399e5832979755cd340383f4ca4069dd5fc7774/browser/base/content/.eslintrc.js
.. _.eslintignore: https://searchfox.org/mozilla-central/source/.eslintignore
.. _seek help: ../index.html#getting-help
.. _patterns in .eslintrc.js: https://searchfox.org/mozilla-central/rev/9399e5832979755cd340383f4ca4069dd5fc7774/.eslintrc.js#24-38
.. _test specific .eslintrc.js file (example): https://searchfox.org/mozilla-central/source/browser/base/content/test/about/.eslintrc.js
.. _environment definitions: ./eslint-plugin-mozilla/environment.html
.. _Configuration (YAML): https://searchfox.org/mozilla-central/source/tools/lint/eslint.yml
.. _Source: https://searchfox.org/mozilla-central/source/tools/lint/eslint/__init__.py
.. _known ones: https://searchfox.org/mozilla-central/rev/287583a4a605eee8cd2d41381ffaea7a93d7b987/.eslintrc.js#24-40
.. _difficult for ESLint to handle: https://bugzilla.mozilla.org/show_bug.cgi?id=1379669
.. _prettier ignore docs: https://prettier.io/docs/en/ignore.html

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

@ -2,12 +2,14 @@
function handleRequest(request, response) {
// The string "hello" repeated 10 times followed by newline. Compressed using gzip.
// prettier-ignore
/* eslint-disable prettier/prettier */
let bytes = [0x1f, 0x8b, 0x08, 0x08, 0x4d, 0xe2, 0xf9, 0x54, 0x00, 0x03, 0x68,
0x65, 0x6c, 0x6c, 0x6f, 0x00, 0xcb, 0x48, 0xcd, 0xc9, 0xc9, 0xcf,
0x20, 0x85, 0xe0, 0x02, 0x00, 0xf5, 0x4b, 0x38, 0xcf, 0x33, 0x00,
0x00, 0x00];
/* eslint-enable prettier/prettier */
response.setHeader("Content-Encoding", "gzip", false);
response.setHeader("Content-Length", "" + bytes.length, false);
response.setHeader("Content-Type", "text/plain", false);

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

@ -1252,10 +1252,9 @@ function ArraySpeciesCreate(originalArray, length) {
// ES 2017 draft (April 8, 2016) 22.1.3.1.1
function IsConcatSpreadable(O) {
// Step 1.
// prettier-ignore
if (!IsObject(O)
if (!IsObject(O) // eslint-disable-line prettier/prettier
#ifdef ENABLE_RECORD_TUPLE
&& !IsTuple(O)
&& !IsTuple(O) // eslint-disable-line prettier/prettier
#endif
) {
return false;

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

@ -92,7 +92,7 @@ function Number_isSafeInteger(number) {
}
// Steps 1.a, 2.
// prettier-ignore
// eslint-disable-next-line prettier/prettier
return -((2 ** 53) - 1) <= integer && integer <= (2 ** 53) - 1;
}

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

@ -27,7 +27,7 @@ function Promise_finally(onFinally) {
} else {
// ThenFinally Function.
// The parentheses prevent the infering of a function name.
// prettier-ignore
// eslint-disable-next-line prettier/prettier
(thenFinally) = function(value) {
// Steps 1-2 (implicit).

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

@ -5,7 +5,7 @@
*
* Intl.NumberFormat Unified API Proposal
*/
// prettier-ignore
/* eslint-disable prettier/prettier */
var sanctionedSimpleUnitIdentifiers = {
"acre": true,
"bit": true,
@ -53,3 +53,4 @@ var sanctionedSimpleUnitIdentifiers = {
"yard": true,
"year": true
};
/* eslint-enable prettier/prettier */

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

@ -3578,10 +3578,11 @@ def writeSanctionedSimpleUnitIdentifiersFiles(all_units, sanctioned_units):
*/"""
)
println("// prettier-ignore")
println("/* eslint-disable prettier/prettier */")
println(
"var sanctionedSimpleUnitIdentifiers = {};".format(sanctioned_units_object)
)
println("/* eslint-enable prettier/prettier */")
sanctioned_h_file = os.path.join(intl_components_src_dir, "MeasureUnitGenerated.h")
with io.open(sanctioned_h_file, mode="w", encoding="utf-8", newline="") as f:

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

@ -8,6 +8,7 @@
</head>
<body>
<script>
/* eslint-disable prettier/prettier */
async function addFrame(url) {
let frame = document.createElement("iframe");

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

@ -7,7 +7,7 @@ const BinaryOutputStream = Components.Constructor(
);
// this is simply a hex dump of a red square .PNG image
// prettier-ignore
/* eslint-disable prettier/prettier */
const RED_SQUARE =
[
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00,
@ -22,7 +22,7 @@ const RED_SQUARE =
0xA3, 0xC4, 0x01, 0x3F, 0x58, 0x1D, 0xEF, 0x27, 0x00, 0x00,
0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
];
/* eslint-enable prettier/prettier */
function handleRequest(request, response) {
let query = {};
request.queryString.split("&").forEach(function(val) {

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

@ -16,7 +16,7 @@ const kSafe = 1;
const kUnsafe = 2;
const kInvalid = 3;
// prettier-ignore
/* eslint-disable prettier/prettier */
let testCases = [
// No IDN
["www.google.com", "www.google.com", kSafe],
@ -1012,6 +1012,7 @@ let testCases = [
// Chromium's IDN encoder/decoder to generate test files loses an
// advantage of having Python's IDN encode/decode the tests.
];
/* eslint-enable prettier/prettier */
function checkEquals(a, b, message, expectedFail) {
if (!expectedFail) {

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

@ -16,6 +16,7 @@
* report the correct diagnostics in the caller scope.
*/
/* eslint-disable prettier/prettier */
/* globals SpecialPowers, Assert */
async function interceptDiagnostics(func) {

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

@ -12,6 +12,7 @@
<span id="hello">World.</span>
<script>
/* eslint-disable prettier/prettier */
/* globals SpecialPowers, content */
add_task(async function() {
@ -54,7 +55,7 @@
is(result, "Hello there.", "Got correct element text from browsing context");
let line = 58; // Keep this in sync with the line number where the callback function starts.
let line = 59; // Keep this in sync with the line number where the callback function starts.
let callback = () => {
let e = new Error("Hello.");
return { filename: e.fileName, lineNumber: e.lineNumber };

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

@ -8,6 +8,8 @@
<body>
<script>
/* eslint-disable prettier/prettier */
add_task(async function() {
let { browsingContextId, innerWindowId } = await SpecialPowers.spawnChrome([12, { b: 42 }], (a, b) => {
Assert.equal(a, 12, "Arg 1");

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

@ -1,3 +1,5 @@
/* eslint-disable prettier/prettier */
function runTest(obj) {
add_task(async _ => {
info("Test: " + obj.testName);

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

@ -279,8 +279,10 @@ function makeRuleset(coeffs, biases) {
);
// Use the selector to grab the descendants:
return setDefault(selectorToDescendants, selector, () =>
Array.from(element.querySelectorAll(selector))
return setDefault(
selectorToDescendants, // eslint-disable-line prettier/prettier
selector,
() => Array.from(element.querySelectorAll(selector))
);
}

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

@ -381,8 +381,10 @@ function createRuleset(coeffs, biases) {
() => new Map()
);
return setDefault(selectorToDescendants, selector, () =>
Array.from(element.querySelectorAll(selector))
return setDefault(
selectorToDescendants, // eslint-disable-line prettier/prettier
selector,
() => Array.from(element.querySelectorAll(selector))
);
}
function clearCache() {

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

@ -6,6 +6,7 @@ import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
const lazy = {};
/* eslint-disable prettier/prettier */
ChromeUtils.defineModuleGetter(
lazy,
"ShellService",
@ -21,7 +22,7 @@ ChromeUtils.defineModuleGetter(
"NormandyUtils",
"resource://normandy/lib/NormandyUtils.jsm"
);
/* eslint-enable prettier/prettier */
ChromeUtils.defineESModuleGetters(lazy, {
TelemetryArchive: "resource://gre/modules/TelemetryArchive.sys.mjs",
TelemetryController: "resource://gre/modules/TelemetryController.sys.mjs",