Skip to content

Commit

Permalink
chore(devDeps): update 'prettier' (#4776)
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba authored Oct 26, 2021
1 parent 9c9fcb5 commit ac43029
Show file tree
Hide file tree
Showing 162 changed files with 3,662 additions and 3,631 deletions.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

module.exports = function(eleventyConfig) {
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(
require('@11ty/eleventy-plugin-inclusive-language'),
{
Expand Down
30 changes: 15 additions & 15 deletions browser-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ var originalOnerrorHandler = global.onerror;
* Revert to original onerror handler if previously defined.
*/

process.removeListener = function(e, fn) {
process.removeListener = function (e, fn) {
if (e === 'uncaughtException') {
if (originalOnerrorHandler) {
global.onerror = originalOnerrorHandler;
} else {
global.onerror = function() {};
global.onerror = function () {};
}
var i = uncaughtExceptionHandlers.indexOf(fn);
if (i !== -1) {
Expand All @@ -58,7 +58,7 @@ process.removeListener = function(e, fn) {
* Implements listenerCount for 'uncaughtException'.
*/

process.listenerCount = function(name) {
process.listenerCount = function (name) {
if (name === 'uncaughtException') {
return uncaughtExceptionHandlers.length;
}
Expand All @@ -69,17 +69,17 @@ process.listenerCount = function(name) {
* Implements uncaughtException listener.
*/

process.on = function(e, fn) {
process.on = function (e, fn) {
if (e === 'uncaughtException') {
global.onerror = function(err, url, line) {
global.onerror = function (err, url, line) {
fn(new Error(err + ' (' + url + ':' + line + ')'));
return !mocha.options.allowUncaught;
};
uncaughtExceptionHandlers.push(fn);
}
};

process.listeners = function(e) {
process.listeners = function (e) {
if (e === 'uncaughtException') {
return uncaughtExceptionHandlers;
}
Expand Down Expand Up @@ -110,7 +110,7 @@ function timeslice() {
* High-performance override of Runner.immediately.
*/

Mocha.Runner.immediately = function(callback) {
Mocha.Runner.immediately = function (callback) {
immediateQueue.push(callback);
if (!immediateTimeout) {
immediateTimeout = setTimeout(timeslice, 0);
Expand All @@ -122,8 +122,8 @@ Mocha.Runner.immediately = function(callback) {
* This is useful when running tests in a browser because window.onerror will
* only receive the 'message' attribute of the Error.
*/
mocha.throwError = function(err) {
uncaughtExceptionHandlers.forEach(function(fn) {
mocha.throwError = function (err) {
uncaughtExceptionHandlers.forEach(function (fn) {
fn(err);
});
throw err;
Expand All @@ -134,7 +134,7 @@ mocha.throwError = function(err) {
* Normally this would happen in Mocha.prototype.loadFiles.
*/

mocha.ui = function(ui) {
mocha.ui = function (ui) {
Mocha.prototype.ui.call(this, ui);
this.suite.emit('pre-require', global, null, this);
return this;
Expand All @@ -144,7 +144,7 @@ mocha.ui = function(ui) {
* Setup mocha with the given setting options.
*/

mocha.setup = function(opts) {
mocha.setup = function (opts) {
if (typeof opts === 'string') {
opts = {ui: opts};
}
Expand All @@ -153,10 +153,10 @@ mocha.setup = function(opts) {
}
var self = this;
Object.keys(opts)
.filter(function(opt) {
.filter(function (opt) {
return opt !== 'delay';
})
.forEach(function(opt) {
.forEach(function (opt) {
if (Object.prototype.hasOwnProperty.call(opts, opt)) {
self[opt](opts[opt]);
}
Expand All @@ -168,7 +168,7 @@ mocha.setup = function(opts) {
* Run mocha, returning the Runner.
*/

mocha.run = function(fn) {
mocha.run = function (fn) {
var options = mocha.options;
mocha.globals('location');

Expand All @@ -183,7 +183,7 @@ mocha.run = function(fn) {
mocha.invert();
}

return Mocha.prototype.run.call(mocha, function(err) {
return Mocha.prototype.run.call(mocha, function (err) {
// The DOM Document is not available in Web Workers.
var document = global.document;
if (
Expand Down
16 changes: 10 additions & 6 deletions docs/_data/supporters.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,19 @@ const getSupporters = async () => {
if (successRate < PRODUCTION_SUCCESS_THRESHOLD) {
if (process.env.NETLIFY && process.env.CONTEXT !== 'deploy-preview') {
throw new Error(
`Failed to meet success threshold ${PRODUCTION_SUCCESS_THRESHOLD *
100}% (was ${successRate *
100}%) for a production deployment; refusing to deploy`
`Failed to meet success threshold ${
PRODUCTION_SUCCESS_THRESHOLD * 100
}% (was ${
successRate * 100
}%) for a production deployment; refusing to deploy`
);
} else {
console.warn(
`WARNING: Success rate of ${successRate *
100}% fails to meet production threshold of ${PRODUCTION_SUCCESS_THRESHOLD *
100}%; would fail a production deployment!`
`WARNING: Success rate of ${
successRate * 100
}% fails to meet production threshold of ${
PRODUCTION_SUCCESS_THRESHOLD * 100
}%; would fail a production deployment!`
);
}
}
Expand Down
10 changes: 5 additions & 5 deletions lib/browser/growl.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var isBrowser = require('../utils').isBrowser;
* @see {@link Mocha#isGrowlCapable}
* @return {boolean} whether browser notification support exists
*/
exports.isCapable = function() {
exports.isCapable = function () {
var hasNotificationSupport = 'Notification' in window;
var hasPromiseSupport = typeof Promise === 'function';
return isBrowser() && hasNotificationSupport && hasPromiseSupport;
Expand All @@ -39,17 +39,17 @@ exports.isCapable = function() {
* @see {@link Mocha#_growl}
* @param {Runner} runner - Runner instance.
*/
exports.notify = function(runner) {
exports.notify = function (runner) {
var promise = isPermitted();

/**
* Attempt notification.
*/
var sendNotification = function() {
var sendNotification = function () {
// If user hasn't responded yet... "No notification for you!" (Seinfeld)
Promise.race([promise, Promise.resolve(undefined)])
.then(canNotify)
.then(function() {
.then(function () {
display(runner);
})
.catch(notPermitted);
Expand Down Expand Up @@ -77,7 +77,7 @@ function isPermitted() {
return Promise.resolve(false);
},
default: function ask() {
return Notification.requestPermission().then(function(permission) {
return Notification.requestPermission().then(function (permission) {
return permission === 'granted';
});
}
Expand Down
2 changes: 1 addition & 1 deletion lib/browser/parse-query.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function parseQuery(qs) {
return qs
.replace('?', '')
.split('&')
.reduce(function(obj, pair) {
.reduce(function (obj, pair) {
var i = pair.indexOf('=');
var key = pair.slice(0, i);
var val = pair.slice(++i);
Expand Down
12 changes: 6 additions & 6 deletions lib/browser/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Progress() {
* @param {number} size
* @return {Progress} Progress instance.
*/
Progress.prototype.size = function(size) {
Progress.prototype.size = function (size) {
this._size = size;
return this;
};
Expand All @@ -39,7 +39,7 @@ Progress.prototype.size = function(size) {
* @param {string} text
* @return {Progress} Progress instance.
*/
Progress.prototype.text = function(text) {
Progress.prototype.text = function (text) {
this._text = text;
return this;
};
Expand All @@ -51,7 +51,7 @@ Progress.prototype.text = function(text) {
* @param {number} size
* @return {Progress} Progress instance.
*/
Progress.prototype.fontSize = function(size) {
Progress.prototype.fontSize = function (size) {
this._fontSize = size;
return this;
};
Expand All @@ -62,7 +62,7 @@ Progress.prototype.fontSize = function(size) {
* @param {string} family
* @return {Progress} Progress instance.
*/
Progress.prototype.font = function(family) {
Progress.prototype.font = function (family) {
this._font = family;
return this;
};
Expand All @@ -73,7 +73,7 @@ Progress.prototype.font = function(family) {
* @param {number} n
* @return {Progress} Progress instance.
*/
Progress.prototype.update = function(n) {
Progress.prototype.update = function (n) {
this.percent = n;
return this;
};
Expand All @@ -84,7 +84,7 @@ Progress.prototype.update = function(n) {
* @param {CanvasRenderingContext2d} ctx
* @return {Progress} Progress instance.
*/
Progress.prototype.draw = function(ctx) {
Progress.prototype.draw = function (ctx) {
try {
var percent = Math.min(this.percent, 100);
var size = this._size;
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ exports.builder = yargs =>
.number(types.number)
.alias(aliases);

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

Expand Down
5 changes: 1 addition & 4 deletions lib/cli/watch-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,7 @@ const createWatcher = (
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', data => {
const str = data
.toString()
.trim()
.toLowerCase();
const str = data.toString().trim().toLowerCase();
if (str === 'rs') rerunner.scheduleRun();
});

Expand Down
10 changes: 5 additions & 5 deletions lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Context() {}
* @param {Runnable} runnable
* @return {Context} context
*/
Context.prototype.runnable = function(runnable) {
Context.prototype.runnable = function (runnable) {
if (!arguments.length) {
return this._runnable;
}
Expand All @@ -37,7 +37,7 @@ Context.prototype.runnable = function(runnable) {
* @param {number} ms
* @return {Context} self
*/
Context.prototype.timeout = function(ms) {
Context.prototype.timeout = function (ms) {
if (!arguments.length) {
return this.runnable().timeout();
}
Expand All @@ -52,7 +52,7 @@ Context.prototype.timeout = function(ms) {
* @param {number} ms
* @return {Context} self
*/
Context.prototype.slow = function(ms) {
Context.prototype.slow = function (ms) {
if (!arguments.length) {
return this.runnable().slow();
}
Expand All @@ -66,7 +66,7 @@ Context.prototype.slow = function(ms) {
* @private
* @throws Pending
*/
Context.prototype.skip = function() {
Context.prototype.skip = function () {
this.runnable().skip();
};

Expand All @@ -77,7 +77,7 @@ Context.prototype.skip = function() {
* @param {number} n
* @return {Context} self
*/
Context.prototype.retries = function(n) {
Context.prototype.retries = function (n) {
if (!arguments.length) {
return this.runnable().retries();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const emitWarning = (msg, type) => {
process.emitWarning(msg, type);
} else {
/* istanbul ignore next */
process.nextTick(function() {
process.nextTick(function () {
console.warn(type + ': ' + msg);
});
}
Expand Down
4 changes: 2 additions & 2 deletions lib/hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ inherits(Hook, Runnable);
/**
* Resets the state for a next run.
*/
Hook.prototype.reset = function() {
Hook.prototype.reset = function () {
Runnable.prototype.reset.call(this);
delete this._error;
};
Expand All @@ -44,7 +44,7 @@ Hook.prototype.reset = function() {
* @param {Error} err
* @return {Error}
*/
Hook.prototype.error = function(err) {
Hook.prototype.error = function (err) {
if (!arguments.length) {
err = this._error;
this._error = null;
Expand Down
Loading

0 comments on commit ac43029

Please sign in to comment.