diff --git a/.eslintignore b/.eslintignore
index 96212a35..f3c9e2a4 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1 +1,2 @@
-**/*{.,-}min.js
+js/*.js
+!js/privatebin.js
diff --git a/.eslintrc b/.eslintrc
index cee9820d..0ca2c39b 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -67,7 +67,6 @@ rules:
no-case-declarations: 2
no-div-regex: 2
no-else-return: 0
- no-empty-label: 2
no-empty-pattern: 2
no-eq-null: 2
no-eval: 2
diff --git a/js/test/Alert.js b/js/test/Alert.js
index 2ee42de6..1e692f02 100644
--- a/js/test/Alert.js
+++ b/js/test/Alert.js
@@ -104,7 +104,7 @@ describe('Alert', function () {
icon = icon.join('');
message = message.join('');
var default_message = 'Loading…';
- if (message.length == 0) {
+ if (message.length === 0) {
message = default_message;
}
var expected = '
- ');
$.PrivateBin.PasteStatus.init();
$.PrivateBin.PasteStatus.showRemainingTime({
@@ -67,14 +68,14 @@ describe('PasteStatus', function () {
'expire_date': remaining_time ? ((new Date()).getTime() / 1000) + remaining_time : 0
});
if (burnafterreading) {
- var result = $('#remainingtime').hasClass('foryoureyesonly') &&
- !$('#remainingtime').hasClass('hidden');
+ result = $('#remainingtime').hasClass('foryoureyesonly') &&
+ !$('#remainingtime').hasClass('hidden');
} else if (remaining_time) {
- var result =!$('#remainingtime').hasClass('foryoureyesonly') &&
- !$('#remainingtime').hasClass('hidden');
+ result =!$('#remainingtime').hasClass('foryoureyesonly') &&
+ !$('#remainingtime').hasClass('hidden');
} else {
- var result = $('#remainingtime').hasClass('hidden') &&
- !$('#remainingtime').hasClass('foryoureyesonly');
+ result = $('#remainingtime').hasClass('hidden') &&
+ !$('#remainingtime').hasClass('foryoureyesonly');
}
clean();
return result;
diff --git a/js/test/PasteViewer.js b/js/test/PasteViewer.js
index ca97518c..cd2de3f4 100644
--- a/js/test/PasteViewer.js
+++ b/js/test/PasteViewer.js
@@ -28,8 +28,8 @@ describe('PasteViewer', function () {
$('#placeholder').hasClass('hidden') &&
$('#prettymessage').hasClass('hidden') &&
$('#plaintext').hasClass('hidden') &&
- $.PrivateBin.PasteViewer.getFormat() == format &&
- $.PrivateBin.PasteViewer.getText() == ''
+ $.PrivateBin.PasteViewer.getFormat() === format &&
+ $.PrivateBin.PasteViewer.getText() === ''
);
$.PrivateBin.PasteViewer.run();
results.push(
@@ -48,9 +48,9 @@ describe('PasteViewer', function () {
results.push(
$('#placeholder').hasClass('hidden') &&
!$.PrivateBin.PasteViewer.isPrettyPrinted() &&
- $.PrivateBin.PasteViewer.getText() == text
+ $.PrivateBin.PasteViewer.getText() === text
);
- if (format == 'markdown') {
+ if (format === 'markdown') {
results.push(
$('#prettymessage').hasClass('hidden') &&
!$('#plaintext').hasClass('hidden')
diff --git a/js/test/Prompt.js b/js/test/Prompt.js
index d093b716..32b48dd3 100644
--- a/js/test/Prompt.js
+++ b/js/test/Prompt.js
@@ -32,7 +32,7 @@ describe('Prompt', function () {
$('#passwordform').submit();
var result = $.PrivateBin.Prompt.getPassword();
clean();
- return result == password;
+ return result === password;
}
);
});
diff --git a/js/test/UiHelper.js b/js/test/UiHelper.js
index 013d062f..e669e609 100644
--- a/js/test/UiHelper.js
+++ b/js/test/UiHelper.js
@@ -39,7 +39,7 @@ describe('UiHelper', function () {
jsc.array(common.jscQueryString()),
jsc.nearray(common.jscBase64String()),
function (schema, address, query, fragment) {
- var expected = schema + '://' + address.join('') + '/' + '?' +
+ var expected = schema + '://' + address.join('') + '/?' +
query.join('') + '#' + fragment.join(''),
clean = jsdom('', {url: expected});