Lint and audit
This commit is contained in:
parent
f078e3b2dc
commit
f5f1220ecc
|
@ -5,6 +5,8 @@
|
|||
"rules": {
|
||||
"indentation": [4, {"except": ["value"], "severity": "warning"}],
|
||||
"selector-type-case": ["lower", {"ignoreTypes": ["foreignObject"]}],
|
||||
"color-hex-length": "long",
|
||||
"color-hex-case": "upper",
|
||||
"no-missing-end-of-source-newline": null
|
||||
}
|
||||
}
|
|
@ -5373,9 +5373,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "3.1.23",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz",
|
||||
"integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==",
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz",
|
||||
"integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==",
|
||||
"dev": true
|
||||
},
|
||||
"nanomatch": {
|
||||
|
|
|
@ -3,7 +3,7 @@ import DOMManager from "./dommanager";
|
|||
export default new class Editor {
|
||||
|
||||
async initialize() {
|
||||
const baseUrl = "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.20.0/min"
|
||||
const baseUrl = "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.20.0/min";
|
||||
|
||||
Object.defineProperty(window, "MonacoEnvironment", {
|
||||
value: {
|
||||
|
|
|
@ -177,44 +177,6 @@ BdApi.deleteData = function(pluginName, key) {
|
|||
};
|
||||
|
||||
// Patches other functions
|
||||
// BdApi.monkeyPatch = function(what, methodName, options) {
|
||||
// const {before, after, instead, once = false, silent = false, force = false} = options;
|
||||
// const displayName = options.displayName || what.displayName || what.name || what.constructor.displayName || what.constructor.name;
|
||||
// if (!silent) console.log("patch", methodName, "of", displayName); // eslint-disable-line no-console
|
||||
// if (!what[methodName]) {
|
||||
// if (force) what[methodName] = function() {};
|
||||
// else return console.error(methodName, "does not exist for", displayName); // eslint-disable-line no-console
|
||||
// }
|
||||
// const origMethod = what[methodName];
|
||||
// const cancel = () => {
|
||||
// if (!silent) console.log("unpatch", methodName, "of", displayName); // eslint-disable-line no-console
|
||||
// what[methodName] = origMethod;
|
||||
// };
|
||||
// what[methodName] = function() {
|
||||
// const data = {
|
||||
// thisObject: this,
|
||||
// methodArguments: arguments,
|
||||
// cancelPatch: cancel,
|
||||
// originalMethod: origMethod,
|
||||
// callOriginalMethod: () => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)
|
||||
// };
|
||||
// if (instead) {
|
||||
// const tempRet = Utilities.suppressErrors(instead, "`instead` callback of " + what[methodName].displayName)(data);
|
||||
// if (tempRet !== undefined) data.returnValue = tempRet;
|
||||
// }
|
||||
// else {
|
||||
// if (before) Utilities.suppressErrors(before, "`before` callback of " + what[methodName].displayName)(data);
|
||||
// data.callOriginalMethod();
|
||||
// if (after) Utilities.suppressErrors(after, "`after` callback of " + what[methodName].displayName)(data);
|
||||
// }
|
||||
// if (once) cancel();
|
||||
// return data.returnValue;
|
||||
// };
|
||||
// what[methodName].__monkeyPatched = true;
|
||||
// if (!what[methodName].__originalMethod) what[methodName].__originalMethod = origMethod;
|
||||
// what[methodName].displayName = "patched " + (what[methodName].displayName || methodName);
|
||||
// return cancel;
|
||||
// };
|
||||
BdApi.monkeyPatch = function(what, methodName, options) {
|
||||
const {before, after, instead, once = false, callerId = "BdApi"} = options;
|
||||
const patchType = before ? "before" : after ? "after" : instead ? "instead" : "";
|
||||
|
@ -234,7 +196,7 @@ BdApi.monkeyPatch = function(what, methodName, options) {
|
|||
return patchReturn;
|
||||
}
|
||||
catch (err) {
|
||||
Logger.err(`${callerId}:monkeyPatch`, `Error in the ${patchType} of ${methodName}`);
|
||||
Logger.stacktrace(`${callerId}:monkeyPatch`, `Error in the ${patchType} of ${methodName}`, err);
|
||||
}
|
||||
});
|
||||
return data.cancelPatch;
|
||||
|
|
|
@ -250,12 +250,13 @@ export default class WebpackModules {
|
|||
static get require() {
|
||||
if (this._require) return this._require;
|
||||
const id = "bd-webpackmodules";
|
||||
let __webpack_require__ = undefined;
|
||||
if (typeof (webpackJsonp) !== "undefined") {
|
||||
let __webpack_require__;
|
||||
if (typeof(webpackJsonp) !== "undefined") {
|
||||
__webpack_require__ = window.webpackJsonp.push([[], {
|
||||
[id]: (module, exports, __internal_require__) => module.exports = __internal_require__
|
||||
}, [[id]]]);
|
||||
} else if (typeof (window[this.chunkName]) !== "undefined") {
|
||||
}
|
||||
else if (typeof(window[this.chunkName]) !== "undefined") {
|
||||
window[this.chunkName].push([[id],
|
||||
{},
|
||||
__internal_require__ => __webpack_require__ = __internal_require__
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
}
|
||||
|
||||
#bd-pub-button:hover {
|
||||
color: #fff;
|
||||
background-color: #3e82e5;
|
||||
color: #FFFFFF;
|
||||
background-color: #3E82E5;
|
||||
}
|
||||
|
||||
#bd-connection {
|
||||
|
@ -38,7 +38,7 @@
|
|||
}
|
||||
|
||||
.bd-footnote {
|
||||
color: #b9bbbe;
|
||||
color: #B9BBBE;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@
|
|||
}
|
||||
|
||||
.bd-server-count-dot {
|
||||
background-color: #43b581;
|
||||
background-color: #43B581;
|
||||
border-radius: 50%;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
|
@ -213,7 +213,7 @@
|
|||
}
|
||||
|
||||
.bd-server-count + .bd-server-count .bd-server-count-dot {
|
||||
background-color: #b9bbbe;
|
||||
background-color: #B9BBBE;
|
||||
}
|
||||
|
||||
.bd-server-count-text {
|
||||
|
@ -235,8 +235,8 @@
|
|||
padding: 0 4px;
|
||||
margin-top: 1px;
|
||||
border-radius: 3px;
|
||||
background: #3e82e5;
|
||||
color: #fff;
|
||||
background: #3E82E5;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.bd-pagination {
|
||||
|
|
|
@ -2,27 +2,27 @@
|
|||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #3e82e5;
|
||||
color: #fff;
|
||||
background-color: #3E82E5;
|
||||
color: #FFFFFF;
|
||||
border-radius: 3px;
|
||||
padding: 4px 8px;
|
||||
transition: background-color 0.17s ease, color 0.17s ease, opacity 250ms ease;
|
||||
}
|
||||
|
||||
.bd-button:hover {
|
||||
background-color: #3875ce;
|
||||
background-color: #3875CE;
|
||||
}
|
||||
|
||||
.bd-button:active {
|
||||
background-color: #3268b7;
|
||||
background-color: #3268B7;
|
||||
}
|
||||
|
||||
.bd-button.bd-button-success {
|
||||
background-color: #43b581;
|
||||
background-color: #43B581;
|
||||
}
|
||||
|
||||
.bd-button.bd-button-success:hover {
|
||||
background-color: #3ca374;
|
||||
background-color: #3CA374;
|
||||
}
|
||||
|
||||
.bd-button.bd-button-success:active {
|
||||
|
@ -30,27 +30,27 @@
|
|||
}
|
||||
|
||||
.bd-button.bd-button-warning {
|
||||
background-color: #faa61a;
|
||||
background-color: #FAA61A;
|
||||
}
|
||||
|
||||
.bd-button.bd-button-warning:hover {
|
||||
background-color: #e19517;
|
||||
background-color: #E19517;
|
||||
}
|
||||
|
||||
.bd-button.bd-button-warning:active {
|
||||
background-color: #c88515;
|
||||
background-color: #C88515;
|
||||
}
|
||||
|
||||
.bd-button.bd-button-danger {
|
||||
background-color: #f04747;
|
||||
background-color: #F04747;
|
||||
}
|
||||
|
||||
.bd-button.bd-button-danger:hover {
|
||||
background-color: #d84040;
|
||||
background-color: #D84040;
|
||||
}
|
||||
|
||||
.bd-button.bd-button-danger:active {
|
||||
background-color: #c03939;
|
||||
background-color: #C03939;
|
||||
}
|
||||
|
||||
.bd-button-disabled {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
.bd-cube1,
|
||||
.bd-cube2 {
|
||||
background-color: #3e82e5;
|
||||
background-color: #3E82E5;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
position: absolute;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
.bd-reload {
|
||||
cursor: pointer;
|
||||
vertical-align: top;
|
||||
fill: #dcddde;
|
||||
fill: #DCDDDE;
|
||||
}
|
||||
|
||||
.bd-reload:hover {
|
||||
fill: #fff;
|
||||
fill: #FFFFFF;
|
||||
}
|
||||
|
||||
.bd-reload-header {
|
||||
|
@ -156,7 +156,7 @@
|
|||
}
|
||||
|
||||
.bd-controls > .bd-addon-button svg {
|
||||
fill: #fff;
|
||||
fill: #FFFFFF;
|
||||
}
|
||||
|
||||
.bd-controls > .bd-addon-button:first-of-type {
|
||||
|
@ -214,7 +214,7 @@
|
|||
}
|
||||
|
||||
.bd-addon-modal-footer .bd-button {
|
||||
background-color: #3e82e5;
|
||||
background-color: #3E82E5;
|
||||
}
|
||||
|
||||
.bd-addon-modal-footer .bd-button:hover {
|
||||
|
@ -240,7 +240,7 @@
|
|||
}
|
||||
|
||||
.bd-addon-views .bd-view-button.selected svg {
|
||||
fill: #fff;
|
||||
fill: #FFFFFF;
|
||||
}
|
||||
|
||||
.bd-addon-views .bd-view-button:hover {
|
||||
|
@ -252,7 +252,7 @@
|
|||
}
|
||||
|
||||
.bd-addon-views .bd-view-button.selected {
|
||||
background-color: #3e82e5;
|
||||
background-color: #3E82E5;
|
||||
}
|
||||
|
||||
.bd-addon-views .bd-view-button + .bd-view-button {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
.theme-dark .bd-social-logo path {
|
||||
fill: #adadad;
|
||||
fill: #ADADAD;
|
||||
}
|
||||
|
||||
.theme-light .bd-social-logo path {
|
||||
fill: #b9bbbe;
|
||||
fill: #B9BBBE;
|
||||
}
|
||||
|
||||
.bd-social-link:hover .bd-social-logo {
|
||||
|
@ -11,7 +11,7 @@
|
|||
}
|
||||
|
||||
.bd-social-link:hover .bd-social-logo path:first-of-type {
|
||||
fill: #3e82e5;
|
||||
fill: #3E82E5;
|
||||
}
|
||||
|
||||
.bd-button-title {
|
||||
|
@ -160,6 +160,19 @@
|
|||
overflow: visible;
|
||||
}
|
||||
|
||||
.bd-settings-title {
|
||||
color: #FFFFFF;
|
||||
font-weight: 600;
|
||||
cursor: default;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.bd-settings-title:not(.bd-settings-group-title) {
|
||||
margin-bottom: 20px;
|
||||
font-size: 20px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.bd-settings-group.collapsible .bd-settings-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -204,19 +217,6 @@
|
|||
margin-top: 0;
|
||||
}
|
||||
|
||||
.bd-settings-title {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
cursor: default;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.bd-settings-title:not(.bd-settings-group-title) {
|
||||
margin-bottom: 20px;
|
||||
font-size: 20px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.bd-settings-title.bd-settings-group-title {
|
||||
margin-bottom: 10px;
|
||||
text-transform: uppercase;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
color: #FFFFFF;
|
||||
background: var(--background-tertiary); /* #2F3129background-color: #202225; */
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--background-secondary);
|
||||
color: #fff;
|
||||
color: #FFFFFF;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -88,8 +88,8 @@
|
|||
}
|
||||
|
||||
.floating-window-buttons .close-button:hover {
|
||||
background: #f04747;
|
||||
color: #fff;
|
||||
background: #F04747;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.floating-window-content #bd-editor-panel {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.bd-notice-success {
|
||||
--color: #3ba55d;
|
||||
--color: #3BA55D;
|
||||
}
|
||||
|
||||
.bd-notice-error {
|
||||
|
@ -40,7 +40,7 @@
|
|||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
box-shadow: var(--elevation-low);
|
||||
color: #fff;
|
||||
color: #FFFFFF;
|
||||
background: var(--color, var(--brand-experiment-600, #3C45A5));
|
||||
}
|
||||
|
||||
|
@ -57,8 +57,8 @@
|
|||
background: url(https://discord.com/assets/7731c77d99babca1a8faec204d98c380.svg) no-repeat;
|
||||
background-position: 50% 55%;
|
||||
background-size: 10px 10px;
|
||||
opacity: .5;
|
||||
transition: opacity .2s;
|
||||
opacity: 0.5;
|
||||
transition: opacity 0.2s;
|
||||
cursor: pointer;
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@
|
|||
position: relative;
|
||||
top: 6px;
|
||||
border: 1px solid;
|
||||
color: #fff;
|
||||
color: #FFFFFF;
|
||||
border-radius: 3px;
|
||||
height: 24px;
|
||||
padding: 0 10px;
|
||||
|
@ -78,15 +78,15 @@
|
|||
vertical-align: top;
|
||||
margin-left: 10px;
|
||||
line-height: 22px;
|
||||
transition: background-color .2s ease,color .2s ease,border-color .2s ease;
|
||||
transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
|
||||
-webkit-app-region: no-drag;
|
||||
border-color: #fff;
|
||||
border-color: #FFFFFF;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.bd-notice-button:hover {
|
||||
color: var(--color, var(--background-mobile-primary));
|
||||
background: #fff;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.bd-notice-close:hover {
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
.bd-toast.toast-error,
|
||||
.bd-toast.toast-warning,
|
||||
.bd-toast.toast-warn {
|
||||
color: #fff;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.bd-toast.closing {
|
||||
|
@ -63,7 +63,7 @@
|
|||
}
|
||||
|
||||
.bd-toast.toast-info {
|
||||
background-color: #4a90e2;
|
||||
background-color: #4A90E2;
|
||||
}
|
||||
|
||||
.bd-toast.toast-info.icon {
|
||||
|
@ -71,7 +71,7 @@
|
|||
}
|
||||
|
||||
.bd-toast.toast-success {
|
||||
background-color: #43b581;
|
||||
background-color: #43B581;
|
||||
}
|
||||
|
||||
.bd-toast.toast-success.icon {
|
||||
|
@ -80,7 +80,7 @@
|
|||
|
||||
.bd-toast.toast-danger,
|
||||
.bd-toast.toast-error {
|
||||
background-color: #f04747;
|
||||
background-color: #F04747;
|
||||
}
|
||||
|
||||
.bd-toast.toast-danger.icon,
|
||||
|
@ -90,7 +90,7 @@
|
|||
|
||||
.bd-toast.toast-warning,
|
||||
.bd-toast.toast-warn {
|
||||
background-color: #ffa600;
|
||||
background-color: #FFA600;
|
||||
}
|
||||
|
||||
.bd-toast.toast-warning.icon,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #3e82e5;
|
||||
background: #3E82E5;
|
||||
padding: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue