1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-16 02:24:19 +02:00

Tweak ESLint rules.

This commit is contained in:
XhmikosR
2017-07-27 13:39:55 +03:00
parent 0492c3a4cd
commit ef8c77d8dc
21 changed files with 39 additions and 40 deletions

View File

@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.alert, undefined, 'alert was set back to undefined (org value)')
assert.strictEqual(typeof $.fn.alert, 'undefined', 'alert was set back to undefined (org value)')
})
QUnit.test('should return jquery collection containing the element', function (assert) {

View File

@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.button, undefined, 'button was set back to undefined (org value)')
assert.strictEqual(typeof $.fn.button, 'undefined', 'button was set back to undefined (org value)')
})
QUnit.test('should return jquery collection containing the element', function (assert) {

View File

@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)')
assert.strictEqual(typeof $.fn.carousel, 'undefined', 'carousel was set back to undefined (orig value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
@@ -371,14 +371,14 @@ $(function () {
var done = assert.async()
$(template)
.on('slid.bs.carousel', function (e) {
assert.ok(e.from !== undefined, 'from present')
assert.ok(e.to !== undefined, 'to present')
assert.ok(typeof e.from !== 'undefined', 'from present')
assert.ok(typeof e.to !== 'undefined', 'to present')
$(this).off()
done()
})
.on('slide.bs.carousel', function (e) {
assert.ok(e.from !== undefined, 'from present')
assert.ok(e.to !== undefined, 'to present')
assert.ok(typeof e.from !== 'undefined', 'from present')
assert.ok(typeof e.to !== 'undefined', 'to present')
$(this).off('slide.bs.carousel')
})
.bootstrapCarousel('next')

View File

@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.collapse, undefined, 'collapse was set back to undefined (org value)')
assert.strictEqual(typeof $.fn.collapse, 'undefined', 'collapse was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {

View File

@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.dropdown, undefined, 'dropdown was set back to undefined (org value)')
assert.strictEqual(typeof $.fn.dropdown, 'undefined', 'dropdown was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
@@ -644,7 +644,7 @@ $(function () {
$triggerDropdown
.parent('.dropdown')
.on('shown.bs.dropdown', function () {
assert.ok($dropdownMenu.attr('style') === undefined, 'No inline style applied by Popper.js')
assert.ok(typeof $dropdownMenu.attr('style') === 'undefined', 'No inline style applied by Popper.js')
done()
})
$triggerDropdown.trigger($.Event('click'))

View File

@@ -34,7 +34,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.modal, undefined, 'modal was set back to undefined (orig value)')
assert.strictEqual(typeof $.fn.modal, 'undefined', 'modal was set back to undefined (orig value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
@@ -380,7 +380,7 @@ $(function () {
$('<div id="modal-test"/>')
.on('hidden.bs.modal', function () {
assert.strictEqual($body.data('padding-right'), undefined, 'data-padding-right should be cleared after closing')
assert.strictEqual(typeof $body.data('padding-right'), 'undefined', 'data-padding-right should be cleared after closing')
$body.removeAttr('style')
done()
})
@@ -422,7 +422,7 @@ $(function () {
$('<div id="modal-test"/>')
.on('hidden.bs.modal', function () {
assert.strictEqual($element.data('padding-right'), undefined, 'data-padding-right should be cleared after closing')
assert.strictEqual(typeof $element.data('padding-right'), 'undefined', 'data-padding-right should be cleared after closing')
$element.remove()
done()
})
@@ -464,7 +464,7 @@ $(function () {
$('<div id="modal-test"/>')
.on('hidden.bs.modal', function () {
assert.strictEqual($element.data('margin-right'), undefined, 'data-margin-right should be cleared after closing')
assert.strictEqual(typeof $element.data('margin-right'), 'undefined', 'data-margin-right should be cleared after closing')
$element.remove()
done()
})

View File

@@ -22,7 +22,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.popover, undefined, 'popover was set back to undefined (org value)')
assert.strictEqual(typeof $.fn.popover, 'undefined', 'popover was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
@@ -304,7 +304,7 @@ $(function () {
assert.ok(false, 'should not fire any popover events')
})
.bootstrapPopover('hide')
assert.strictEqual($popover.data('bs.popover'), undefined, 'should not initialize the popover')
assert.strictEqual(typeof $popover.data('bs.popover'), 'undefined', 'should not initialize the popover')
})
QUnit.test('should fire inserted event', function (assert) {

View File

@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.scrollspy, undefined, 'scrollspy was set back to undefined (org value)')
assert.strictEqual(typeof $.fn.scrollspy, 'undefined', 'scrollspy was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {

View File

@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.tab, undefined, 'tab was set back to undefined (org value)')
assert.strictEqual(typeof $.fn.tab, 'undefined', 'tab was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {

View File

@@ -22,7 +22,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.tooltip, undefined, 'tooltip was set back to undefined (org value)')
assert.strictEqual(typeof $.fn.tooltip, 'undefined', 'tooltip was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
@@ -382,7 +382,7 @@ $(function () {
.on('inserted.bs.tooltip', function () {
var $tooltip = $($(this).data('bs.tooltip').tip)
assert.ok($tooltip.hasClass('bs-tooltip-right'))
assert.ok($tooltip.attr('style') === undefined)
assert.ok(typeof $tooltip.attr('style') === 'undefined')
$styles.remove()
done()
})
@@ -701,7 +701,7 @@ $(function () {
assert.ok(false, 'should not fire any tooltip events')
})
.bootstrapTooltip('hide')
assert.strictEqual($tooltip.data('bs.tooltip'), undefined, 'should not initialize the tooltip')
assert.strictEqual(typeof $tooltip.data('bs.tooltip'), 'undefined', 'should not initialize the tooltip')
})
QUnit.test('should not remove tooltip if multiple triggers are set and one is still active', function (assert) {