Skip to content

Commit

Permalink
Run Prettier on full codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Sep 5, 2020
1 parent e1b3111 commit 42ec388
Show file tree
Hide file tree
Showing 831 changed files with 3,692 additions and 3,665 deletions.
6 changes: 3 additions & 3 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const _rimraf = require('rimraf');
function rimraf(dir) {
let retries = 0;

const retry = cb => {
_rimraf(dir, { maxBusyTries: 1 }, err => {
const retry = (cb) => {
_rimraf(dir, { maxBusyTries: 1 }, (err) => {
if (!err) {
return cb();
}
Expand All @@ -18,7 +18,7 @@ function rimraf(dir) {
});
};

return cb => retry(cb);
return (cb) => retry(cb);
}

gulp.task('clean-vscode', rimraf('standalone-packages/monaco-editor-core'));
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ Thanks goes to these wonderful people

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

## Thanks
Expand Down
12 changes: 6 additions & 6 deletions packages/@styled-system/css/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports['default'] = exports.css = exports.responsive = exports.get = void 0;
function _extends() {
_extends =
Object.assign ||
function(target) {
function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
Expand All @@ -33,7 +33,7 @@ var get = function get(obj, key, def, p, undef) {
};

exports.get = get;
var defaultBreakpoints = [40, 52, 64].map(function(n) {
var defaultBreakpoints = [40, 52, 64].map(function (n) {
return n + 'em';
});
var defaultTheme = {
Expand Down Expand Up @@ -161,7 +161,7 @@ var transforms = [
'bottom',
'left',
'right',
].reduce(function(acc, curr) {
].reduce(function (acc, curr) {
var _extends2;

return _extends(
Expand All @@ -172,11 +172,11 @@ var transforms = [
}, {});

var responsive = function responsive(styles) {
return function(theme) {
return function (theme) {
var next = {};
var breakpoints = get(theme, 'breakpoints', defaultBreakpoints);
var mediaQueries = [null].concat(
breakpoints.map(function(n) {
breakpoints.map(function (n) {
return '@media screen and (min-width: ' + n + ')';
})
);
Expand Down Expand Up @@ -212,7 +212,7 @@ var responsive = function responsive(styles) {
exports.responsive = responsive;

var css = function css(args) {
return function(props) {
return function (props) {
if (props === void 0) {
props = {};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const path = require('path');
const nodePaths = (process.env.NODE_PATH || '')
.split(process.platform === 'win32' ? ';' : ':')
.filter(Boolean)
.map(p => path.resolve(p));
.map((p) => path.resolve(p));

function resolveApp(relativePath) {
return path.resolve(relativePath);
Expand Down
82 changes: 38 additions & 44 deletions packages/app/config/stubs/lru-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ var Yallist = require('yallist');
var hasSymbol = typeof Symbol === 'function';
var makeSymbol;
if (hasSymbol) {
makeSymbol = function(key) {
makeSymbol = function (key) {
return Symbol(key);
};
} else {
makeSymbol = function(key) {
makeSymbol = function (key) {
return '_' + key;
};
}
Expand Down Expand Up @@ -79,80 +79,80 @@ function LRUCache(options) {

// resize the cache when the max changes.
Object.defineProperty(LRUCache.prototype, 'max', {
set: function(mL) {
set: function (mL) {
if (!mL || !(typeof mL === 'number') || mL <= 0) {
mL = Infinity;
}
this[MAX] = mL;
trim(this);
},
get: function() {
get: function () {
return this[MAX];
},
enumerable: true,
});

Object.defineProperty(LRUCache.prototype, 'allowStale', {
set: function(allowStale) {
set: function (allowStale) {
this[ALLOW_STALE] = !!allowStale;
},
get: function() {
get: function () {
return this[ALLOW_STALE];
},
enumerable: true,
});

Object.defineProperty(LRUCache.prototype, 'maxAge', {
set: function(mA) {
set: function (mA) {
if (!mA || !(typeof mA === 'number') || mA < 0) {
mA = 0;
}
this[MAX_AGE] = mA;
trim(this);
},
get: function() {
get: function () {
return this[MAX_AGE];
},
enumerable: true,
});

// resize the cache when the lengthCalculator changes.
Object.defineProperty(LRUCache.prototype, 'lengthCalculator', {
set: function(lC) {
set: function (lC) {
if (typeof lC !== 'function') {
lC = naiveLength;
}
if (lC !== this[LENGTH_CALCULATOR]) {
this[LENGTH_CALCULATOR] = lC;
this[LENGTH] = 0;
this[LRU_LIST].forEach(function(hit) {
this[LRU_LIST].forEach(function (hit) {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
this[LENGTH] += hit.length;
}, this);
}
trim(this);
},
get: function() {
get: function () {
return this[LENGTH_CALCULATOR];
},
enumerable: true,
});

Object.defineProperty(LRUCache.prototype, 'length', {
get: function() {
get: function () {
return this[LENGTH];
},
enumerable: true,
});

Object.defineProperty(LRUCache.prototype, 'itemCount', {
get: function() {
get: function () {
return this[LRU_LIST].length;
},
enumerable: true,
});

LRUCache.prototype.rforEach = function(fn, thisp) {
LRUCache.prototype.rforEach = function (fn, thisp) {
thisp = thisp || this;
for (var walker = this[LRU_LIST].tail; walker !== null; ) {
var prev = walker.prev;
Expand All @@ -174,7 +174,7 @@ function forEachStep(self, fn, node, thisp) {
}
}

LRUCache.prototype.forEach = function(fn, thisp) {
LRUCache.prototype.forEach = function (fn, thisp) {
thisp = thisp || this;
for (var walker = this[LRU_LIST].head; walker !== null; ) {
var next = walker.next;
Expand All @@ -183,21 +183,21 @@ LRUCache.prototype.forEach = function(fn, thisp) {
}
};

LRUCache.prototype.keys = function() {
return this[LRU_LIST].toArray().map(function(k) {
LRUCache.prototype.keys = function () {
return this[LRU_LIST].toArray().map(function (k) {
return k.key;
}, this);
};

LRUCache.prototype.values = function() {
return this[LRU_LIST].toArray().map(function(k) {
LRUCache.prototype.values = function () {
return this[LRU_LIST].toArray().map(function (k) {
return k.value;
}, this);
};

LRUCache.prototype.reset = function() {
LRUCache.prototype.reset = function () {
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
this[LRU_LIST].forEach(function(hit) {
this[LRU_LIST].forEach(function (hit) {
this[DISPOSE](hit.key, hit.value);
}, this);
}
Expand All @@ -207,8 +207,8 @@ LRUCache.prototype.reset = function() {
this[LENGTH] = 0; // length of items in the list
};

LRUCache.prototype.dump = function() {
return this[LRU_LIST].map(function(hit) {
LRUCache.prototype.dump = function () {
return this[LRU_LIST].map(function (hit) {
if (!isStale(this, hit)) {
return {
k: hit.key,
Expand All @@ -218,16 +218,16 @@ LRUCache.prototype.dump = function() {
}
}, this)
.toArray()
.filter(function(h) {
.filter(function (h) {
return h;
});
};

LRUCache.prototype.dumpLru = function() {
LRUCache.prototype.dumpLru = function () {
return this[LRU_LIST];
};

LRUCache.prototype.inspect = function(n, opts) {
LRUCache.prototype.inspect = function (n, opts) {
var str = 'LRUCache {';
var extras = false;

Expand Down Expand Up @@ -265,7 +265,7 @@ LRUCache.prototype.inspect = function(n, opts) {
}

var didFirst = false;
this[LRU_LIST].forEach(function(item) {
this[LRU_LIST].forEach(function (item) {
if (didFirst) {
str += ',\n ';
} else {
Expand All @@ -275,10 +275,7 @@ LRUCache.prototype.inspect = function(n, opts) {
didFirst = true;
str += '\n ';
}
var key = util
.inspect(item.key)
.split('\n')
.join('\n ');
var key = util.inspect(item.key).split('\n').join('\n ');
var val = { value: item.value };
if (item.maxAge !== maxAge) {
val.maxAge = item.maxAge;
Expand All @@ -290,10 +287,7 @@ LRUCache.prototype.inspect = function(n, opts) {
val.stale = true;
}

val = util
.inspect(val, opts)
.split('\n')
.join('\n ');
val = util.inspect(val, opts).split('\n').join('\n ');
str += key + ' => ' + val;
});

Expand All @@ -305,7 +299,7 @@ LRUCache.prototype.inspect = function(n, opts) {
return str;
};

LRUCache.prototype.set = function(key, value, maxAge) {
LRUCache.prototype.set = function (key, value, maxAge) {
maxAge = maxAge || this[MAX_AGE];

var now = maxAge ? Date.now() : 0;
Expand Down Expand Up @@ -355,7 +349,7 @@ LRUCache.prototype.set = function(key, value, maxAge) {
return true;
};

LRUCache.prototype.has = function(key) {
LRUCache.prototype.has = function (key) {
if (!this[CACHE].has(key)) return false;
var hit = this[CACHE].get(key).value;
if (isStale(this, hit)) {
Expand All @@ -364,26 +358,26 @@ LRUCache.prototype.has = function(key) {
return true;
};

LRUCache.prototype.get = function(key) {
LRUCache.prototype.get = function (key) {
return get(this, key, true);
};

LRUCache.prototype.peek = function(key) {
LRUCache.prototype.peek = function (key) {
return get(this, key, false);
};

LRUCache.prototype.pop = function() {
LRUCache.prototype.pop = function () {
var node = this[LRU_LIST].tail;
if (!node) return null;
del(this, node);
return node.value;
};

LRUCache.prototype.del = function(key) {
LRUCache.prototype.del = function (key) {
del(this, this[CACHE].get(key));
};

LRUCache.prototype.load = function(arr) {
LRUCache.prototype.load = function (arr) {
// reset the cache
this.reset();

Expand All @@ -405,9 +399,9 @@ LRUCache.prototype.load = function(arr) {
}
};

LRUCache.prototype.prune = function() {
LRUCache.prototype.prune = function () {
var self = this;
this[CACHE].forEach(function(value, key) {
this[CACHE].forEach(function (value, key) {
get(self, key, false);
});
};
Expand Down
4 changes: 2 additions & 2 deletions packages/app/config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ const ESLINT_PLUGIN_VUE_INDEX = `module.exports = {
'rules'
)
)
.filter(filename => path.extname(filename) === '.js')
.map(filename => {
.filter((filename) => path.extname(filename) === '.js')
.map((filename) => {
const ruleId = path.basename(filename, '.js');
return ` "${ruleId}": require("eslint-plugin-vue/lib/rules/${filename}"),`;
})
Expand Down
4 changes: 2 additions & 2 deletions packages/app/integration-tests/browser-tests/browsers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const hash = require('child_process')
.execSync('git rev-parse --short HEAD')
.toString();

const delay = ms =>
new Promise(resolve => {
const delay = (ms) =>
new Promise((resolve) => {
setTimeout(() => {
resolve();
}, ms);
Expand Down
Loading

0 comments on commit 42ec388

Please sign in to comment.