Skip to content

Commit ac43029

Browse files
authored
chore(devDeps): update 'prettier' (#4776)
1 parent 9c9fcb5 commit ac43029

File tree

162 files changed

+3662
-3631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+3662
-3631
lines changed

.eleventy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
module.exports = function(eleventyConfig) {
3+
module.exports = function (eleventyConfig) {
44
eleventyConfig.addPlugin(
55
require('@11ty/eleventy-plugin-inclusive-language'),
66
{

browser-entry.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ var originalOnerrorHandler = global.onerror;
4040
* Revert to original onerror handler if previously defined.
4141
*/
4242

43-
process.removeListener = function(e, fn) {
43+
process.removeListener = function (e, fn) {
4444
if (e === 'uncaughtException') {
4545
if (originalOnerrorHandler) {
4646
global.onerror = originalOnerrorHandler;
4747
} else {
48-
global.onerror = function() {};
48+
global.onerror = function () {};
4949
}
5050
var i = uncaughtExceptionHandlers.indexOf(fn);
5151
if (i !== -1) {
@@ -58,7 +58,7 @@ process.removeListener = function(e, fn) {
5858
* Implements listenerCount for 'uncaughtException'.
5959
*/
6060

61-
process.listenerCount = function(name) {
61+
process.listenerCount = function (name) {
6262
if (name === 'uncaughtException') {
6363
return uncaughtExceptionHandlers.length;
6464
}
@@ -69,17 +69,17 @@ process.listenerCount = function(name) {
6969
* Implements uncaughtException listener.
7070
*/
7171

72-
process.on = function(e, fn) {
72+
process.on = function (e, fn) {
7373
if (e === 'uncaughtException') {
74-
global.onerror = function(err, url, line) {
74+
global.onerror = function (err, url, line) {
7575
fn(new Error(err + ' (' + url + ':' + line + ')'));
7676
return !mocha.options.allowUncaught;
7777
};
7878
uncaughtExceptionHandlers.push(fn);
7979
}
8080
};
8181

82-
process.listeners = function(e) {
82+
process.listeners = function (e) {
8383
if (e === 'uncaughtException') {
8484
return uncaughtExceptionHandlers;
8585
}
@@ -110,7 +110,7 @@ function timeslice() {
110110
* High-performance override of Runner.immediately.
111111
*/
112112

113-
Mocha.Runner.immediately = function(callback) {
113+
Mocha.Runner.immediately = function (callback) {
114114
immediateQueue.push(callback);
115115
if (!immediateTimeout) {
116116
immediateTimeout = setTimeout(timeslice, 0);
@@ -122,8 +122,8 @@ Mocha.Runner.immediately = function(callback) {
122122
* This is useful when running tests in a browser because window.onerror will
123123
* only receive the 'message' attribute of the Error.
124124
*/
125-
mocha.throwError = function(err) {
126-
uncaughtExceptionHandlers.forEach(function(fn) {
125+
mocha.throwError = function (err) {
126+
uncaughtExceptionHandlers.forEach(function (fn) {
127127
fn(err);
128128
});
129129
throw err;
@@ -134,7 +134,7 @@ mocha.throwError = function(err) {
134134
* Normally this would happen in Mocha.prototype.loadFiles.
135135
*/
136136

137-
mocha.ui = function(ui) {
137+
mocha.ui = function (ui) {
138138
Mocha.prototype.ui.call(this, ui);
139139
this.suite.emit('pre-require', global, null, this);
140140
return this;
@@ -144,7 +144,7 @@ mocha.ui = function(ui) {
144144
* Setup mocha with the given setting options.
145145
*/
146146

147-
mocha.setup = function(opts) {
147+
mocha.setup = function (opts) {
148148
if (typeof opts === 'string') {
149149
opts = {ui: opts};
150150
}
@@ -153,10 +153,10 @@ mocha.setup = function(opts) {
153153
}
154154
var self = this;
155155
Object.keys(opts)
156-
.filter(function(opt) {
156+
.filter(function (opt) {
157157
return opt !== 'delay';
158158
})
159-
.forEach(function(opt) {
159+
.forEach(function (opt) {
160160
if (Object.prototype.hasOwnProperty.call(opts, opt)) {
161161
self[opt](opts[opt]);
162162
}
@@ -168,7 +168,7 @@ mocha.setup = function(opts) {
168168
* Run mocha, returning the Runner.
169169
*/
170170

171-
mocha.run = function(fn) {
171+
mocha.run = function (fn) {
172172
var options = mocha.options;
173173
mocha.globals('location');
174174

@@ -183,7 +183,7 @@ mocha.run = function(fn) {
183183
mocha.invert();
184184
}
185185

186-
return Mocha.prototype.run.call(mocha, function(err) {
186+
return Mocha.prototype.run.call(mocha, function (err) {
187187
// The DOM Document is not available in Web Workers.
188188
var document = global.document;
189189
if (

docs/_data/supporters.js

+10-6
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,19 @@ const getSupporters = async () => {
262262
if (successRate < PRODUCTION_SUCCESS_THRESHOLD) {
263263
if (process.env.NETLIFY && process.env.CONTEXT !== 'deploy-preview') {
264264
throw new Error(
265-
`Failed to meet success threshold ${PRODUCTION_SUCCESS_THRESHOLD *
266-
100}% (was ${successRate *
267-
100}%) for a production deployment; refusing to deploy`
265+
`Failed to meet success threshold ${
266+
PRODUCTION_SUCCESS_THRESHOLD * 100
267+
}% (was ${
268+
successRate * 100
269+
}%) for a production deployment; refusing to deploy`
268270
);
269271
} else {
270272
console.warn(
271-
`WARNING: Success rate of ${successRate *
272-
100}% fails to meet production threshold of ${PRODUCTION_SUCCESS_THRESHOLD *
273-
100}%; would fail a production deployment!`
273+
`WARNING: Success rate of ${
274+
successRate * 100
275+
}% fails to meet production threshold of ${
276+
PRODUCTION_SUCCESS_THRESHOLD * 100
277+
}%; would fail a production deployment!`
274278
);
275279
}
276280
}

lib/browser/growl.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var isBrowser = require('../utils').isBrowser;
2323
* @see {@link Mocha#isGrowlCapable}
2424
* @return {boolean} whether browser notification support exists
2525
*/
26-
exports.isCapable = function() {
26+
exports.isCapable = function () {
2727
var hasNotificationSupport = 'Notification' in window;
2828
var hasPromiseSupport = typeof Promise === 'function';
2929
return isBrowser() && hasNotificationSupport && hasPromiseSupport;
@@ -39,17 +39,17 @@ exports.isCapable = function() {
3939
* @see {@link Mocha#_growl}
4040
* @param {Runner} runner - Runner instance.
4141
*/
42-
exports.notify = function(runner) {
42+
exports.notify = function (runner) {
4343
var promise = isPermitted();
4444

4545
/**
4646
* Attempt notification.
4747
*/
48-
var sendNotification = function() {
48+
var sendNotification = function () {
4949
// If user hasn't responded yet... "No notification for you!" (Seinfeld)
5050
Promise.race([promise, Promise.resolve(undefined)])
5151
.then(canNotify)
52-
.then(function() {
52+
.then(function () {
5353
display(runner);
5454
})
5555
.catch(notPermitted);
@@ -77,7 +77,7 @@ function isPermitted() {
7777
return Promise.resolve(false);
7878
},
7979
default: function ask() {
80-
return Notification.requestPermission().then(function(permission) {
80+
return Notification.requestPermission().then(function (permission) {
8181
return permission === 'granted';
8282
});
8383
}

lib/browser/parse-query.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = function parseQuery(qs) {
1111
return qs
1212
.replace('?', '')
1313
.split('&')
14-
.reduce(function(obj, pair) {
14+
.reduce(function (obj, pair) {
1515
var i = pair.indexOf('=');
1616
var key = pair.slice(0, i);
1717
var val = pair.slice(++i);

lib/browser/progress.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function Progress() {
2727
* @param {number} size
2828
* @return {Progress} Progress instance.
2929
*/
30-
Progress.prototype.size = function(size) {
30+
Progress.prototype.size = function (size) {
3131
this._size = size;
3232
return this;
3333
};
@@ -39,7 +39,7 @@ Progress.prototype.size = function(size) {
3939
* @param {string} text
4040
* @return {Progress} Progress instance.
4141
*/
42-
Progress.prototype.text = function(text) {
42+
Progress.prototype.text = function (text) {
4343
this._text = text;
4444
return this;
4545
};
@@ -51,7 +51,7 @@ Progress.prototype.text = function(text) {
5151
* @param {number} size
5252
* @return {Progress} Progress instance.
5353
*/
54-
Progress.prototype.fontSize = function(size) {
54+
Progress.prototype.fontSize = function (size) {
5555
this._fontSize = size;
5656
return this;
5757
};
@@ -62,7 +62,7 @@ Progress.prototype.fontSize = function(size) {
6262
* @param {string} family
6363
* @return {Progress} Progress instance.
6464
*/
65-
Progress.prototype.font = function(family) {
65+
Progress.prototype.font = function (family) {
6666
this._font = family;
6767
return this;
6868
};
@@ -73,7 +73,7 @@ Progress.prototype.font = function(family) {
7373
* @param {number} n
7474
* @return {Progress} Progress instance.
7575
*/
76-
Progress.prototype.update = function(n) {
76+
Progress.prototype.update = function (n) {
7777
this.percent = n;
7878
return this;
7979
};
@@ -84,7 +84,7 @@ Progress.prototype.update = function(n) {
8484
* @param {CanvasRenderingContext2d} ctx
8585
* @return {Progress} Progress instance.
8686
*/
87-
Progress.prototype.draw = function(ctx) {
87+
Progress.prototype.draw = function (ctx) {
8888
try {
8989
var percent = Math.min(this.percent, 100);
9090
var size = this._size;

lib/cli/run.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ exports.builder = yargs =>
366366
.number(types.number)
367367
.alias(aliases);
368368

369-
exports.handler = async function(argv) {
369+
exports.handler = async function (argv) {
370370
debug('post-yargs config', argv);
371371
const mocha = new Mocha(argv);
372372

lib/cli/watch-run.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,7 @@ const createWatcher = (
231231
process.stdin.resume();
232232
process.stdin.setEncoding('utf8');
233233
process.stdin.on('data', data => {
234-
const str = data
235-
.toString()
236-
.trim()
237-
.toLowerCase();
234+
const str = data.toString().trim().toLowerCase();
238235
if (str === 'rs') rerunner.scheduleRun();
239236
});
240237

lib/context.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function Context() {}
2222
* @param {Runnable} runnable
2323
* @return {Context} context
2424
*/
25-
Context.prototype.runnable = function(runnable) {
25+
Context.prototype.runnable = function (runnable) {
2626
if (!arguments.length) {
2727
return this._runnable;
2828
}
@@ -37,7 +37,7 @@ Context.prototype.runnable = function(runnable) {
3737
* @param {number} ms
3838
* @return {Context} self
3939
*/
40-
Context.prototype.timeout = function(ms) {
40+
Context.prototype.timeout = function (ms) {
4141
if (!arguments.length) {
4242
return this.runnable().timeout();
4343
}
@@ -52,7 +52,7 @@ Context.prototype.timeout = function(ms) {
5252
* @param {number} ms
5353
* @return {Context} self
5454
*/
55-
Context.prototype.slow = function(ms) {
55+
Context.prototype.slow = function (ms) {
5656
if (!arguments.length) {
5757
return this.runnable().slow();
5858
}
@@ -66,7 +66,7 @@ Context.prototype.slow = function(ms) {
6666
* @private
6767
* @throws Pending
6868
*/
69-
Context.prototype.skip = function() {
69+
Context.prototype.skip = function () {
7070
this.runnable().skip();
7171
};
7272

@@ -77,7 +77,7 @@ Context.prototype.skip = function() {
7777
* @param {number} n
7878
* @return {Context} self
7979
*/
80-
Context.prototype.retries = function(n) {
80+
Context.prototype.retries = function (n) {
8181
if (!arguments.length) {
8282
return this.runnable().retries();
8383
}

lib/errors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const emitWarning = (msg, type) => {
1818
process.emitWarning(msg, type);
1919
} else {
2020
/* istanbul ignore next */
21-
process.nextTick(function() {
21+
process.nextTick(function () {
2222
console.warn(type + ': ' + msg);
2323
});
2424
}

lib/hook.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ inherits(Hook, Runnable);
3131
/**
3232
* Resets the state for a next run.
3333
*/
34-
Hook.prototype.reset = function() {
34+
Hook.prototype.reset = function () {
3535
Runnable.prototype.reset.call(this);
3636
delete this._error;
3737
};
@@ -44,7 +44,7 @@ Hook.prototype.reset = function() {
4444
* @param {Error} err
4545
* @return {Error}
4646
*/
47-
Hook.prototype.error = function(err) {
47+
Hook.prototype.error = function (err) {
4848
if (!arguments.length) {
4949
err = this._error;
5050
this._error = null;

0 commit comments

Comments
 (0)