mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for tools. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D155176
This commit is contained in:
parent
365f6e8e10
commit
65b92de13b
@ -482,7 +482,6 @@ module.exports = {
|
||||
"layout/**",
|
||||
"netwerk/**",
|
||||
"storage/test/unit/test_vacuum.js",
|
||||
"tools/**",
|
||||
"widget/tests/test_assign_event_data.html",
|
||||
],
|
||||
rules: {
|
||||
|
@ -188,7 +188,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
leave(node, parent) {
|
||||
if (parents.length == 0) {
|
||||
if (!parents.length) {
|
||||
throw new Error("Left more nodes than entered.");
|
||||
}
|
||||
parents.pop();
|
||||
|
@ -43,7 +43,7 @@ module.exports = {
|
||||
if (
|
||||
callee.type !== "Identifier" ||
|
||||
callee.name !== "Date" ||
|
||||
node.arguments.length > 0
|
||||
node.arguments.length
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ async function test_with_filter(fnFilterWithContentId) {
|
||||
const profile = await waitSamplingAndStopAndGetProfile();
|
||||
|
||||
await TestUtils.waitForCondition(async function() {
|
||||
return (await GetPidsWithSamplerThread()).length == 0;
|
||||
return !(await GetPidsWithSamplerThread()).length;
|
||||
}, "Wait for all sampler threads to stop after profiler stop");
|
||||
|
||||
return { contentPid, pidsWithSamplerThread, profile };
|
||||
|
@ -30,7 +30,7 @@ add_task(async () => {
|
||||
|
||||
delayMS *= 2;
|
||||
|
||||
if (thread0.samples.data.length == 0) {
|
||||
if (!thread0.samples.data.length) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ add_task(async () => {
|
||||
// Check for FileIO in any of the background threads.
|
||||
if (thread.name.startsWith("BgIOThreadPool")) {
|
||||
const markers = getInflatedFileIOMarkers(thread, filename);
|
||||
if (markers.length > 0) {
|
||||
if (markers.length) {
|
||||
backgroundThread = thread;
|
||||
backgroundThreadFileIO = markers;
|
||||
break;
|
||||
|
@ -42,7 +42,7 @@ var apply = () => {
|
||||
updateLabels();
|
||||
|
||||
if (
|
||||
Object.keys(filters).length == 0 ||
|
||||
!Object.keys(filters).length ||
|
||||
(Object.keys(filters).length == 1 && "build_type" in filters)
|
||||
) {
|
||||
selection.value = "";
|
||||
|
Loading…
Reference in New Issue
Block a user