Skip to content

Commit 78fcc2c

Browse files
committed
Updated to fix eslint validation errors
1 parent c139b46 commit 78fcc2c

File tree

33 files changed

+153
-154
lines changed

33 files changed

+153
-154
lines changed

.eslintignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
**/node_modules
21
**/third_party

.eslintrc

+55-55
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
"dot-notation": 2,
1010
"eqeqeq": 2,
1111
"indent": [
12-
2,
13-
2
12+
"error",
13+
2
1414
],
1515
"key-spacing": [
16-
2,
17-
{
18-
"beforeColon": false,
19-
"afterColon": true
20-
}
16+
2,
17+
{
18+
"beforeColon": false,
19+
"afterColon": true
20+
}
2121
],
2222
"max-len": [2, 80, 2, {"ignoreUrls": true}],
2323
"new-cap": 2,
@@ -33,58 +33,58 @@
3333
"object-curly-spacing": [2, "never"],
3434
"padded-blocks": [2, "never"],
3535
"quotes": [
36-
2,
37-
"single"
36+
2,
37+
"single"
3838
],
3939
"semi": [
40-
2,
41-
"always"
40+
2,
41+
"always"
4242
],
4343
"space-before-blocks": 2,
4444
"space-before-function-paren": [2, "never"],
4545
"spaced-comment": 2,
4646
"valid-typeof": 2
47-
},
48-
"env": {
49-
"es6": true,
50-
"browser": true,
51-
"node": true
52-
},
53-
"extends": "eslint:recommended",
54-
"globals": {
55-
"_uacct": true,
56-
"addExplicitTest": true,
57-
"addTest": true,
58-
"arrayAverage": true,
59-
"arrayMax": true,
60-
"arrayMin": true,
61-
"audioContext": true,
62-
"AudioContext": true,
63-
"Call": true,
64-
"chrome": true,
65-
"createLineChart": true,
66-
"expectEquals": true,
67-
"ga": true,
68-
"google": true,
69-
"jQuery": true,
70-
"MediaStreamTrack": true,
71-
"report": true,
72-
"reportBug": true,
73-
"reportError": true,
74-
"reportFatal": true,
75-
"reportInfo": true,
76-
"reportSuccess": true,
77-
"RTCIceCandidate": true,
78-
"RTCPeerConnection": true,
79-
"RTCSessionDescription": true,
80-
"setTestProgress": true,
81-
"setTimeoutWithProgressBar": true,
82-
"shaka": true,
83-
"Ssim": true,
84-
"StatisticsAggregate": true,
85-
"testFinished": true,
86-
"trace": true,
87-
"urchinTracker": true,
88-
"webrtcDetectedBrowser": true,
89-
"webrtcDetectedVersion": true
90-
}}
47+
},
48+
"env": {
49+
"es6": true,
50+
"browser": true,
51+
"node": true
52+
},
53+
"extends": "eslint:recommended",
54+
"globals": {
55+
"_uacct": true,
56+
"addExplicitTest": true,
57+
"addTest": true,
58+
"arrayAverage": true,
59+
"arrayMax": true,
60+
"arrayMin": true,
61+
"audioContext": true,
62+
"AudioContext": true,
63+
"Call": true,
64+
"chrome": true,
65+
"createLineChart": true,
66+
"expectEquals": true,
67+
"ga": true,
68+
"google": true,
69+
"jQuery": true,
70+
"MediaStreamTrack": true,
71+
"report": true,
72+
"reportBug": true,
73+
"reportError": true,
74+
"reportFatal": true,
75+
"reportInfo": true,
76+
"reportSuccess": true,
77+
"RTCIceCandidate": true,
78+
"RTCPeerConnection": true,
79+
"RTCSessionDescription": true,
80+
"setTestProgress": true,
81+
"setTimeoutWithProgressBar": true,
82+
"shaka": true,
83+
"Ssim": true,
84+
"StatisticsAggregate": true,
85+
"testFinished": true,
86+
"trace": true,
87+
"urchinTracker": true,
88+
"webrtcDetectedBrowser": true,
89+
"webrtcDetectedVersion": true
90+
}}

audiodata/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var eventTimeElement = document.getElementById('eventTimeElement');
2323
var eventDataElement = document.getElementById('eventDataElement');
2424

2525
framebufferLengthInput.addEventListener('change',
26-
handleFramebufferLengthChanged, false);
26+
handleFramebufferLengthChanged, false);
2727
mediaElement.addEventListener('loadedmetadata', handleMetadata, false);
2828

2929
mediaElement.addEventListener('MozAudioAvailable', handleAudioData, false);

eme/clearkey/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function handleMessage(event) {
7979
// Convert Uint8Array into base64 using base64url alphabet, without padding.
8080
function toBase64(u8arr) {
8181
return btoa(String.fromCharCode.apply(null, u8arr)).
82-
replace(/\+/g, '-').replace(/\//g, '_').replace(/=*$/, '');
82+
replace(/\+/g, '-').replace(/\//g, '_').replace(/=*$/, '');
8383
}
8484

8585
// This takes the place of a license server.

getusermedia/getsettings/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ function handleError(error) {
4747
}
4848

4949
navigator.mediaDevices.getUserMedia(constraints).
50-
then(handleSuccess).catch(handleError);
50+
then(handleSuccess).catch(handleError);

getusermedia/hd/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function handleError(error) {
3838
}
3939

4040
navigator.mediaDevices.getUserMedia(constraints).
41-
then(handleSuccess).catch(handleError);
41+
then(handleSuccess).catch(handleError);
4242

4343
video.onplay = function() {
4444
dimensions.textContent = 'Actual video dimensions: ' + video.videoWidth +

getusermedia/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ function handleError(error) {
3232
}
3333

3434
navigator.mediaDevices.getUserMedia(constraints).
35-
then(handleSuccess).catch(handleError);
35+
then(handleSuccess).catch(handleError);

getusermedia/screencapture/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ function handleError(error) {
4040
}
4141

4242
navigator.mediaDevices.getUserMedia(constraints).
43-
then(handleSuccess).catch(handleError);
43+
then(handleSuccess).catch(handleError);

getusermedia/sources/js/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var audioSelect = document.querySelector('select#audioSource');
2121
var videoSelect = document.querySelector('select#videoSource');
2222

2323
navigator.mediaDevices.enumerateDevices()
24-
.then(gotDevices).then(getStream).catch(handleError);
24+
.then(gotDevices).then(getStream).catch(handleError);
2525

2626
audioSelect.onchange = getStream;
2727
videoSelect.onchange = getStream;
@@ -66,7 +66,7 @@ function getStream() {
6666
};
6767

6868
navigator.mediaDevices.getUserMedia(constraints).
69-
then(gotStream).catch(handleError);
69+
then(gotStream).catch(handleError);
7070
}
7171

7272
function gotStream(stream) {

headtrackr/js/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function handleFaceTrackingEvent() {
7878
overlayContext.rotate(event.angle - (Math.PI / 2));
7979
overlayContext.strokeStyle = '#00CC00';
8080
overlayContext.strokeRect((-(event.width / 2)) >> 0,
81-
(-(event.height / 2)) >> 0, event.width, event.height);
81+
(-(event.height / 2)) >> 0, event.width, event.height);
8282
overlayContext.rotate((Math.PI / 2) - event.angle);
8383
overlayContext.translate(-event.x, -event.y);
8484
}
@@ -100,6 +100,6 @@ document.addEventListener('facetrackingEvent', handleFaceTrackingEvent);
100100
// requires headPosition : true in Tracker constructor
101101
document.addEventListener('headtrackingEvent', handleHeadTrackingEvent);
102102
document.addEventListener('headtrackrStatus', handleheadtrackrStatusEvent,
103-
true);
103+
true);
104104
htracker.init(videoInput, canvasInput);
105105
htracker.start();

install/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if ('serviceWorker' in navigator) {
3636
});
3737
window.addEventListener('beforeinstallprompt', event => {
3838
event.preventDefault();
39-
// console.log('beforeinstallprompt event:', event);
39+
// console.log('beforeinstallprompt event:', event);
4040
installButton.removeAttribute('hidden');
4141
installButton.addEventListener('click', () => {
4242
event.prompt();

lunr/shop/js/main.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
'use strict';
1818

19-
/* global elasticlunr, lunr */
19+
/* global elasticlunr */
2020

2121
const queryInput = document.getElementById('query');
2222
const matchList = document.getElementById('matches');
@@ -46,18 +46,18 @@ queryInput.oninput = function() {
4646
title: {boost: 2},
4747
description: {boost: 1}
4848
},
49-
bool: "OR",
49+
bool: 'OR',
5050
expand: true
5151
};
52-
const matches = window.matches = index.search(query, options);
53-
endPerf();
54-
logPerf('Search');
55-
displayMatches(matches);
56-
}
52+
const matches = window.matches = index.search(query, options);
53+
endPerf();
54+
logPerf('Search');
55+
displayMatches(matches);
56+
};
5757

5858
function displayMatches(matches) {
5959
if (matches.length === 0) {
60-
matchList.innerHTML = "No matches";
60+
matchList.innerHTML = 'No matches';
6161
return;
6262
}
6363
console.log('Matches: ', matches);

mediacapture/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function handleInput(inputEvent) {
3535
try {
3636
var url = window.URL.createObjectURL(file);
3737
displayElement.src = url;
38-
// window.URL.revokeObjectURL(url);
38+
// window.URL.revokeObjectURL(url);
3939
} catch(event) {
4040
try {
4141
var fileReader = new FileReader();

mse/audio/css/gapless.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@
1111
}
1212

1313
.play-overlay, .waveform, .waveform-container {
14-
min-height: 300px;
1514
margin: auto;
15+
min-height: 300px;
1616
width: 750px;
1717
}
1818

1919
.play-overlay {
2020
background: url(../images/yt_play.png);
21-
background-size: 80px 60px;
22-
background-repeat: no-repeat;
23-
background-position:center;
2421
background-color: #eee;
22+
background-position:center;
23+
background-repeat: no-repeat;
24+
background-size: 80px 60px;
2525
opacity: .3;
26-
z-index: 10;
2726
position: absolute;
27+
z-index: 10;
2828
}
2929

3030
.play-overlay:hover {
31-
opacity: .6;
3231
cursor: pointer;
32+
opacity: .6;
3333
}

pictureart/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var availableWidth = document.querySelector('#availableWidth');
2727

2828
function displayData() {
2929
imgSrc.innerHTML = '<a href="' + img.currentSrc + '">' +
30-
img.currentSrc.replace(/^.*[\\\/]/, '') + '</a>';
30+
img.currentSrc.replace(/^.*[\\/]/, '') + '</a>';
3131
imgNaturalWidth.textContent = img.naturalWidth;
3232
imgWidth.textContent = img.width;
3333
dpr.textContent = window.devicePixelRatio;

picturetype/js/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ var imgSrc = document.querySelector('#imgSrc');
2121

2222
img.onload = function() {
2323
imgSrc.textContent =
24-
img.currentSrc.replace(/^.*[\\\/]/, '');
24+
img.currentSrc.replace(/^.*[\\/]/, '');
2525
};
2626

2727
// in case image already loaded -- is there a better way?
28-
imgSrc.textContent = img.currentSrc.replace(/^.*[\\\/]/, '');
28+
imgSrc.textContent = img.currentSrc.replace(/^.*[\\/]/, '');

promise/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ limitations under the License.
6060
for (var i = 0; i < stories.length; i++) {
6161
var title = stories[i].title;
6262
var link = stories[i].link;
63-
ul += '<li><h3><a href=\"' + link + '\" class=\"story\">' +
63+
ul += '<li><h3><a href="' + link + '" class="story">' +
6464
title + '</a></h3>';
6565
}
6666
ul += '</ul>';

promises/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ limitations under the License.
6060
for (var i = 0; i < stories.length; i++) {
6161
var title = stories[i].title;
6262
var link = stories[i].link;
63-
ul += '<li><a href=\"' + link + '\" class=\"story\">' +
63+
ul += '<li><a href="' + link + '" class="story">' +
6464
title + '</a></li>';
6565
}
6666
ul += '</ul>';

requestanimationframe/js/main.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ limitations under the License.
5151
var _dX = 1;
5252
var _transform = ('transform' in _square.style ? 'transform' :
5353
'webkitTransform' in _square.style ? 'webkitTransform' :
54-
'mozTransform' in _square.style ? 'mozTransform' :
55-
'msTransform' in _square.style ? 'msTransform' :
56-
'oTransform' in _square.style ? 'oTransform' :
57-
'transform');
54+
'mozTransform' in _square.style ? 'mozTransform' :
55+
'msTransform' in _square.style ? 'msTransform' :
56+
'oTransform' in _square.style ? 'oTransform' :
57+
'transform');
5858

5959
_container.addEventListener('click', interrupt, false);
6060
_container.addEventListener('dblclick', resume, false);

requestidlecallback/js/main.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ limitations under the License.
3939
for (var l = 0; l < toDo; ++l) {
4040
_xhr = new XMLHttpRequest();
4141

42-
/*
43-
NB
44-
NEVER pass in 'false' to XHR as its third parameter in production code --
45-
Doing so initiates a **synchronous** XHR,
46-
which will eat the main thread for breakfast.
47-
We do it here specifically to demonstrate that the requestIdleCallback is not
48-
executed until the main thread is freed
49-
*/
42+
/*
43+
NB
44+
NEVER pass in 'false' to XHR as its third parameter in production code --
45+
Doing so initiates a **synchronous** XHR,
46+
which will eat the main thread for breakfast.
47+
We do it here specifically to demonstrate that the requestIdleCallback
48+
is not executed until the main thread is freed
49+
*/
5050

5151
document.querySelector('.high-priority > .output').
5252
insertAdjacentHTML('beforeend', '<p>Did task at ' +

0 commit comments

Comments
 (0)