launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #22082
[Merge] lp:~cjwatson/launchpad/eslint-eqeqeq into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/eslint-eqeqeq into lp:launchpad with lp:~cjwatson/launchpad/eslint-regexes as a prerequisite.
Commit message:
Use === and !== in JS rather than == and !=.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/eslint-eqeqeq/+merge/335615
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/eslint-eqeqeq into lp:launchpad.
=== modified file 'lib/lp/app/javascript/languages.js'
--- lib/lp/app/javascript/languages.js 2012-07-07 14:00:30 +0000
+++ lib/lp/app/javascript/languages.js 2018-01-02 05:04:14 +0000
@@ -20,11 +20,11 @@
var code = href.substr(href.lastIndexOf("/")+1);
var english_name = element.get('text').toLowerCase();
var comment_start = english_name.indexOf(' (');
- if(comment_start != -1) {
+ if(comment_start !== -1) {
english_name = english_name.substring(0, comment_start);
}
- if(code.indexOf(searchstring) == -1 &&
- english_name.indexOf(searchstring) == -1) {
+ if(code.indexOf(searchstring) === -1 &&
+ english_name.indexOf(searchstring) === -1) {
element.ancestor('li').addClass('hidden');
}
else {
@@ -33,7 +33,7 @@
}
});
var no_filter_matches = Y.one('#no_filter_matches');
- if(count_matches == 0) {
+ if(count_matches === 0) {
no_filter_matches.removeClass('hidden');
}
else {
=== modified file 'lib/lp/code/javascript/branchmergeproposal.status.js'
--- lib/lp/code/javascript/branchmergeproposal.status.js 2017-09-22 19:41:16 +0000
+++ lib/lp/code/javascript/branchmergeproposal.status.js 2018-01-02 05:04:14 +0000
@@ -33,7 +33,7 @@
success: function(entry) {
var cb = status_choice_edit.get('contentBox');
Y.Array.each(conf.status_widget_items, function(item) {
- if (item.value ==
+ if (item.value ===
status_choice_edit.get('value')) {
cb.one('a').addClass(item.css_class);
} else {
@@ -95,11 +95,11 @@
old_row = old_rows.item(old_pos);
var new_id = new_row.get('id');
var old_id = old_row.get('id');
- if (new_id == old_id) {
- if (new_id != 'summary-row-b-diff') {
+ if (new_id === old_id) {
+ if (new_id !== 'summary-row-b-diff') {
// Don't mess with the diff.
- if (new_row.get('innerHTML') !=
- old_row.get('innerHTML')) {
+ if (new_row.get('innerHTML') !==
+ old_row.get('innerHTML')) {
existing_summary.insertBefore(
new_row, old_row);
old_row.remove();
@@ -125,7 +125,7 @@
while (new_pos < new_size) {
new_row = new_rows.item(new_pos);
++new_pos;
- if (new_row.get('id') != 'summary-row-b-diff') {
+ if (new_row.get('id') !== 'summary-row-b-diff') {
existing_summary.append(new_row);
}
}
=== modified file 'lib/lp/code/javascript/sourcepackagerecipe.new.js'
--- lib/lp/code/javascript/sourcepackagerecipe.new.js 2017-09-22 19:41:16 +0000
+++ lib/lp/code/javascript/sourcepackagerecipe.new.js 2018-01-02 05:04:14 +0000
@@ -34,7 +34,7 @@
module.onclick_use_ppa = function(e) {
var value = getRadioSelectedValue('input[name="field.use_ppa"]');
- if (value == 'create-new') {
+ if (value === 'create-new') {
set_enabled(PPA_NAME_ID, true);
set_enabled(PPA_SELECTOR_ID, false);
}
=== modified file 'lib/lp/translations/javascript/importqueueentry.js'
--- lib/lp/translations/javascript/importqueueentry.js 2012-07-07 14:00:30 +0000
+++ lib/lp/translations/javascript/importqueueentry.js 2018-01-02 05:04:14 +0000
@@ -180,7 +180,7 @@
for (var option_index = 0; option_index < num_options; option_index++) {
var option = options.item(option_index);
var known_name = option.get('textContent');
- if (known_name == name && template_domains[known_name] == domain) {
+ if (known_name === name && template_domains[known_name] === domain) {
// The current template name/domain are in the dropdown's
// options. Select that option.
potemplate_dropdown.set('selectedIndex', option_index);
@@ -237,7 +237,7 @@
*/
function handleFileTypeChange() {
var file_type = this.get('value');
- if (file_type != last_file_type) {
+ if (file_type !== last_file_type) {
updateCurrentFileType(file_type, true);
}
}
Follow ups