fix: all auto fixable eslint issues (#31900)
* fix: eslint operator-linebreak issue * fix: eslint quotes issue * fix: react jsx indent and props issues * fix: eslint trailing spaces issues * fix: eslint line around directives issue * fix: eslint prefer template issue * fix: eslint semi rule * fix: eslint newline per chain rule * fix: eslint space infix ops rule * fix: eslint space-in-parens issue * fix: eslint space before function paren issue * fix: eslint space before blocks issue * fix: eslint arrow body style issue * fix: eslint dot-location issue * fix: eslint quotes issue * fix: eslint quote props issue * fix: eslint operator assignment issue * fix: eslint new line after import issue * fix: indent issues * fix: operator assignment issue
This commit is contained in:
committed by
GitHub
parent
118ea3a024
commit
228180b1ef
@@ -67,7 +67,7 @@
|
||||
expect(cssLeft).toBeCloseTo(posX - 15, 1);
|
||||
expect(cssTop).toBeCloseTo(posY - 15, 1);
|
||||
expect(state.inputEl.val()).toBe(
|
||||
'[' + Math.round(posX) + ',' + Math.round(posY) + ']'
|
||||
`[${Math.round(posX)},${Math.round(posY)}]`
|
||||
);
|
||||
});
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
expect(cssLeft).toBeCloseTo(posX - 15, 1);
|
||||
expect(cssTop).toBeCloseTo(posY - 15, 1);
|
||||
expect(state.inputEl.val()).toBe(
|
||||
'[' + Math.round(posX) + ',' + Math.round(posY) + ']'
|
||||
`[${Math.round(posX)},${Math.round(posY)}]`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
state = 'closed';
|
||||
}
|
||||
|
||||
anchors = $el.find('.' + anchorsElClass);
|
||||
anchors = $el.find(`.${anchorsElClass}`);
|
||||
|
||||
if (state === 'closed') {
|
||||
expect($el.find('.longform')).toBeHidden();
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
if (document.createEvent) {
|
||||
el.dispatchEvent(event);
|
||||
} else {
|
||||
el.fireEvent('on' + event.eventType, event);
|
||||
el.fireEvent(`on${event.eventType}`, event);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
return {};
|
||||
} else if (settings.url === '/save_user_state') {
|
||||
return {success: true};
|
||||
} else if (settings.url.match(new RegExp(jasmine.getFixtures().fixturesPath + '.+', 'g'))) {
|
||||
} else if (settings.url.match(new RegExp(`${jasmine.getFixtures().fixturesPath}.+`, 'g'))) {
|
||||
return origAjax(settings);
|
||||
} else {
|
||||
return $.ajax.and.callThrough();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
define(name, [], function() { return globalValue; });
|
||||
}
|
||||
} else {
|
||||
console.error('Expected library to be included on page, but not found on window object: ' + name);
|
||||
console.error(`Expected library to be included on page, but not found on window object: ${name}`);
|
||||
}
|
||||
};
|
||||
defineDependency('jQuery', 'jquery');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import '../helper.js'
|
||||
import '../helper.js';
|
||||
|
||||
(function(undefined) {
|
||||
'use strict';
|
||||
|
||||
@@ -92,8 +92,8 @@
|
||||
|
||||
$.each(['iPad', 'Android'], function(index, device) {
|
||||
it(
|
||||
'is shown on paused video on ' + device
|
||||
+ ' in HTML5 player',
|
||||
`is shown on paused video on ${device
|
||||
} in HTML5 player`,
|
||||
function() {
|
||||
var btnPlay;
|
||||
|
||||
@@ -107,8 +107,8 @@
|
||||
});
|
||||
|
||||
it(
|
||||
'is hidden on playing video on ' + device
|
||||
+ ' in HTML5 player',
|
||||
`is hidden on playing video on ${device
|
||||
} in HTML5 player`,
|
||||
function() {
|
||||
var btnPlay;
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
});
|
||||
|
||||
it(
|
||||
'is hidden on paused video on ' + device
|
||||
+ ' in YouTube player',
|
||||
`is hidden on paused video on ${device
|
||||
} in YouTube player`,
|
||||
function() {
|
||||
var btnPlay;
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
describe('when on a touch based device', function() {
|
||||
$.each(['iPad', 'Android'], function(index, device) {
|
||||
it('create video volume control on' + device, function() {
|
||||
it(`create video volume control on${device}`, function() {
|
||||
window.onTouchBasedDevice.and.returnValue([device]);
|
||||
state = jasmine.initializePlayer();
|
||||
|
||||
@@ -847,7 +847,7 @@
|
||||
|
||||
$.each(['iPad', 'Android'], function(index, device) {
|
||||
var message = 'controls become visible after playing starts '
|
||||
+ 'on ' + device;
|
||||
+ `on ${device}`;
|
||||
|
||||
it(message, function(done) {
|
||||
var controls;
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
// because sliders are used in other parts of Video.
|
||||
});
|
||||
$.each(['iPad', 'Android'], function(index, device) {
|
||||
it('build the slider on ' + device, function() {
|
||||
it(`build the slider on ${device}`, function() {
|
||||
window.onTouchBasedDevice.and.returnValue([device]);
|
||||
|
||||
state = jasmine.initializePlayer();
|
||||
@@ -240,8 +240,8 @@
|
||||
left = testCase.startTime * step,
|
||||
width = testCase.endTime * step - left,
|
||||
expectedParams = {
|
||||
left: left + '%',
|
||||
width: width + '%'
|
||||
left: `${left}%`,
|
||||
width: `${width}%`
|
||||
},
|
||||
params = state.videoProgressSlider.getRangeParams(
|
||||
testCase.startTime, testCase.endTime, testCase.duration
|
||||
|
||||
@@ -183,7 +183,7 @@ import * as Time from 'time.js';
|
||||
state.videoSaveStatePlugin.onUnload();
|
||||
expect($.ajax).not.toHaveBeenCalledWith({
|
||||
url: state.config.saveStateUrl
|
||||
})
|
||||
});
|
||||
state.config.saveStateEnabled = true;
|
||||
$.ajax.calls.reset();
|
||||
state.videoSaveStatePlugin.onUnload();
|
||||
@@ -200,7 +200,7 @@ import * as Time from 'time.js';
|
||||
state.el.trigger('pause');
|
||||
expect($.ajax).not.toHaveBeenCalledWith({
|
||||
url: state.config.saveStateUrl
|
||||
})
|
||||
});
|
||||
state.config.saveStateEnabled = true;
|
||||
state.el.trigger('pause');
|
||||
expect($.ajax).toHaveBeenCalledWith({
|
||||
@@ -233,7 +233,7 @@ import * as Time from 'time.js';
|
||||
state.config.saveStateEnabled = false;
|
||||
state.config.recordedYoutubeIsAvailable = false;
|
||||
state.el.trigger('youtube_availability', [true]);
|
||||
expect($.ajax).not.toHaveBeenCalled()
|
||||
expect($.ajax).not.toHaveBeenCalled();
|
||||
state.config.saveStateEnabled = true;
|
||||
state.config.recordedYoutubeIsAvailable = false;
|
||||
state.el.trigger('youtube_availability', [true]);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
$.each(li.toArray().reverse(), function(index, link) {
|
||||
expect($(link).attr('data-speed')).toEqual(state.speeds[index]);
|
||||
expect($(link).find('.speed-option').text()).toBe(
|
||||
state.speeds[index] + 'x'
|
||||
`${state.speeds[index]}x`
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
describe('when running on touch based device', function() {
|
||||
$.each(['iPad', 'Android'], function(index, device) {
|
||||
it('is not rendered on' + device, function() {
|
||||
it(`is not rendered on${device}`, function() {
|
||||
window.onTouchBasedDevice.and.returnValue([device]);
|
||||
state = jasmine.initializePlayer();
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
var $region = $('.video-live-region');
|
||||
|
||||
var getExpectedText = function(text) {
|
||||
return text + ' Volume.';
|
||||
return `${text} Volume.`;
|
||||
};
|
||||
|
||||
actual.setVolume(volume, true, true);
|
||||
|
||||
Reference in New Issue
Block a user