Skip to content

Commit 72bd9f3

Browse files
author
Bastien Abadie
committed
frontend: fix eqeqeq rule
1 parent a05cc55 commit 72bd9f3

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

frontend/src/common.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function monitor_options() {
172172
// Monitor input & select changes
173173
const fields = document.querySelectorAll("input, select");
174174
for (const field of fields) {
175-
if (field.type == "text") {
175+
if (field.type === "text") {
176176
// React on enter
177177
field.onkeydown = async evt => {
178178
if (evt.keyCode === 13) {
@@ -185,7 +185,7 @@ function monitor_options() {
185185
// React on change
186186
field.onchange = async evt => {
187187
let value = evt.target.value;
188-
if (evt.target.type == "checkbox") {
188+
if (evt.target.type === "checkbox") {
189189
value = evt.target.checked ? "on" : "off";
190190
}
191191
const params = {};
@@ -212,7 +212,7 @@ const get_third_party_paths = (function() {
212212
return async function() {
213213
if (!paths) {
214214
const response = await get_source("tools/rewriting/ThirdPartyPaths.txt");
215-
paths = response.split("\n").filter(path => path != "");
215+
paths = response.split("\n").filter(path => path !== "");
216216
}
217217

218218
return paths;
@@ -259,7 +259,7 @@ export function filter_languages(files) {
259259
const rust_extensions = ["rs"];
260260

261261
return files.filter(file => {
262-
if (file.type == "directory") {
262+
if (file.type === "directory") {
263263
return true;
264264
} else if (cpp_extensions.find(ext => file.path.endsWith("." + ext))) {
265265
return cpp;
@@ -296,12 +296,12 @@ export function filter_last_push_date(files) {
296296
const upper_limit = new Date();
297297
let lower_limit = new Date();
298298

299-
if (elem.value == "one_year") {
299+
if (elem.value === "one_year") {
300300
lower_limit.setFullYear(upper_limit.getFullYear() - 1);
301-
} else if (elem.value == "two_years") {
301+
} else if (elem.value === "two_years") {
302302
upper_limit.setFullYear(upper_limit.getFullYear() - 1);
303303
lower_limit.setFullYear(lower_limit.getFullYear() - 2);
304-
} else if (elem.value == "older_than_two_years") {
304+
} else if (elem.value === "older_than_two_years") {
305305
upper_limit.setFullYear(upper_limit.getFullYear() - 2);
306306
lower_limit = new Date("1970-01-01T00:00:00Z");
307307
} else {
@@ -345,7 +345,7 @@ export function build_navbar(path, revision) {
345345

346346
// Display helpers
347347
function canDisplay() {
348-
return document.readyState == "complete";
348+
return document.readyState === "complete";
349349
}
350350

351351
export function message(cssClass, message) {

frontend/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ function browser_menu(revision, filters, route) {
3232
platforms: filters.platforms.map(p => {
3333
return {
3434
name: p,
35-
selected: p == route.platform
35+
selected: p === route.platform
3636
};
3737
}),
3838
suites: filters.suites.map(s => {
3939
return {
4040
name: s,
41-
selected: s == route.suite
41+
selected: s === route.suite
4242
};
4343
})
4444
};

frontend/src/zero_coverage_report.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export function zero_coverage_menu(route) {
5252
function sort_entries(entries) {
5353
return entries
5454
.sort(([dir1, stats1], [dir2, stats2]) => {
55-
if (stats1.children != stats2.children) {
55+
if (stats1.children !== stats2.children) {
5656
return stats1.children < stats2.children;
5757
}
5858

59-
if (stats1.funcs != stats2.funcs) {
59+
if (stats1.funcs !== stats2.funcs) {
6060
return stats1.funcs < stats2.funcs;
6161
}
6262

@@ -125,7 +125,7 @@ export async function zero_coverage_display(data, dir) {
125125
dir = dir.substring(0, dir.length - 1);
126126
}
127127
dir += "/";
128-
if (dir == "/") {
128+
if (dir === "/") {
129129
dir = "";
130130
}
131131

@@ -166,7 +166,7 @@ export async function zero_coverage_display(data, dir) {
166166
entries: sort_entries(Array.from(map.entries())),
167167
entry_url() {
168168
const path = dir + this.dir;
169-
if (this.stats.children != 0) {
169+
if (this.stats.children !== 0) {
170170
return buildRoute({
171171
view: "zero",
172172
path

0 commit comments

Comments
 (0)