Skip to content

Commit 56f634f

Browse files
author
Bastien Abadie
committed
frontend: fix eqeqeq rule
1 parent 95aaed7 commit 56f634f

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
@@ -179,7 +179,7 @@ function monitor_options() {
179179
// Monitor input & select changes
180180
const fields = document.querySelectorAll("input, select");
181181
for (const field of fields) {
182-
if (field.type == "text") {
182+
if (field.type === "text") {
183183
// React on enter
184184
field.onkeydown = async evt => {
185185
if (evt.keyCode === 13) {
@@ -192,7 +192,7 @@ function monitor_options() {
192192
// React on change
193193
field.onchange = async evt => {
194194
let value = evt.target.value;
195-
if (evt.target.type == "checkbox") {
195+
if (evt.target.type === "checkbox") {
196196
value = evt.target.checked ? "on" : "off";
197197
}
198198
const params = {};
@@ -219,7 +219,7 @@ const get_third_party_paths = (function() {
219219
return async function() {
220220
if (!paths) {
221221
const response = await get_source("tools/rewriting/ThirdPartyPaths.txt");
222-
paths = response.split("\n").filter(path => path != "");
222+
paths = response.split("\n").filter(path => path !== "");
223223
}
224224

225225
return paths;
@@ -266,7 +266,7 @@ export function filter_languages(files) {
266266
const rust_extensions = ["rs"];
267267

268268
return files.filter(file => {
269-
if (file.type == "directory") {
269+
if (file.type === "directory") {
270270
return true;
271271
} else if (cpp_extensions.find(ext => file.path.endsWith("." + ext))) {
272272
return cpp;
@@ -303,12 +303,12 @@ export function filter_last_push_date(files) {
303303
const upper_limit = new Date();
304304
let lower_limit = new Date();
305305

306-
if (elem.value == "one_year") {
306+
if (elem.value === "one_year") {
307307
lower_limit.setFullYear(upper_limit.getFullYear() - 1);
308-
} else if (elem.value == "two_years") {
308+
} else if (elem.value === "two_years") {
309309
upper_limit.setFullYear(upper_limit.getFullYear() - 1);
310310
lower_limit.setFullYear(lower_limit.getFullYear() - 2);
311-
} else if (elem.value == "older_than_two_years") {
311+
} else if (elem.value === "older_than_two_years") {
312312
upper_limit.setFullYear(upper_limit.getFullYear() - 2);
313313
lower_limit = new Date("1970-01-01T00:00:00Z");
314314
} else {
@@ -352,7 +352,7 @@ export function build_navbar(path, revision) {
352352

353353
// Display helpers
354354
function canDisplay() {
355-
return document.readyState == "complete";
355+
return document.readyState === "complete";
356356
}
357357

358358
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
@@ -73,11 +73,11 @@ export function zero_coverage_menu(route) {
7373
function sort_entries(entries) {
7474
return entries
7575
.sort(([dir1, stats1], [dir2, stats2]) => {
76-
if (stats1.children != stats2.children) {
76+
if (stats1.children !== stats2.children) {
7777
return stats1.children < stats2.children;
7878
}
7979

80-
if (stats1.funcs != stats2.funcs) {
80+
if (stats1.funcs !== stats2.funcs) {
8181
return stats1.funcs < stats2.funcs;
8282
}
8383

@@ -146,7 +146,7 @@ export async function zero_coverage_display(data, dir) {
146146
dir = dir.substring(0, dir.length - 1);
147147
}
148148
dir += "/";
149-
if (dir == "/") {
149+
if (dir === "/") {
150150
dir = "";
151151
}
152152

@@ -187,7 +187,7 @@ export async function zero_coverage_display(data, dir) {
187187
entries: sort_entries(Array.from(map.entries())),
188188
entry_url() {
189189
const path = dir + this.dir;
190-
if (this.stats.children != 0) {
190+
if (this.stats.children !== 0) {
191191
return buildRoute({
192192
view: "zero",
193193
path

0 commit comments

Comments
 (0)