Fixes all linting issues
This commit is contained in:
parent
30ecf92a8d
commit
845f5d514b
|
@ -3458,9 +3458,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-react": {
|
||||
"version": "7.20.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.20.3.tgz",
|
||||
"integrity": "sha512-txbo090buDeyV0ugF3YMWrzLIUqpYTsWSDZV9xLSmExE1P/Kmgg9++PD931r+KEWS66O1c9R4srLVVHmeHpoAg==",
|
||||
"version": "7.21.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.3.tgz",
|
||||
"integrity": "sha512-OI4GwTCqyIb4ipaOEGLWdaOHCXZZydStAsBEPB2e1ZfNM37bojpgO1BoOQbFb0eLVz3QLDx7b+6kYcrxCuJfhw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-includes": "^3.1.1",
|
||||
|
@ -4956,6 +4956,12 @@
|
|||
"integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=",
|
||||
"dev": true
|
||||
},
|
||||
"is-negative-zero": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz",
|
||||
"integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=",
|
||||
"dev": true
|
||||
},
|
||||
"is-number": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
|
||||
|
@ -7743,13 +7749,62 @@
|
|||
"dev": true
|
||||
},
|
||||
"side-channel": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz",
|
||||
"integrity": "sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.3.tgz",
|
||||
"integrity": "sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"es-abstract": "^1.17.0-next.1",
|
||||
"object-inspect": "^1.7.0"
|
||||
"es-abstract": "^1.18.0-next.0",
|
||||
"object-inspect": "^1.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"es-abstract": {
|
||||
"version": "1.18.0-next.1",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
|
||||
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"es-to-primitive": "^1.2.1",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.1",
|
||||
"is-callable": "^1.2.2",
|
||||
"is-negative-zero": "^2.0.0",
|
||||
"is-regex": "^1.1.1",
|
||||
"object-inspect": "^1.8.0",
|
||||
"object-keys": "^1.1.1",
|
||||
"object.assign": "^4.1.1",
|
||||
"string.prototype.trimend": "^1.0.1",
|
||||
"string.prototype.trimstart": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"is-callable": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
|
||||
"integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==",
|
||||
"dev": true
|
||||
},
|
||||
"is-regex": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz",
|
||||
"integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-symbols": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"object.assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz",
|
||||
"integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"define-properties": "^1.1.3",
|
||||
"es-abstract": "^1.18.0-next.0",
|
||||
"has-symbols": "^1.0.1",
|
||||
"object-keys": "^1.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"babel-plugin-module-resolver": "^4.0.0",
|
||||
"circular-dependency-plugin": "^5.2.0",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-plugin-react": "^7.20.3",
|
||||
"eslint-plugin-react": "^7.21.3",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-postcss": "^8.0.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
|
|
|
@ -87,15 +87,15 @@ export default class AddonManager {
|
|||
if (!filename.endsWith(this.extension)) {
|
||||
// Lets check to see if this filename has the duplicated file pattern `something(1).ext`
|
||||
const match = filename.match(this.duplicatePattern);
|
||||
if (!match) continue;
|
||||
if (!match) return;
|
||||
const ext = match[0];
|
||||
const truncated = filename.replace(ext, "");
|
||||
const newFilename = truncated + this.extension;
|
||||
|
||||
// If this file already exists, give a warning and move on.
|
||||
if (fs.existsSync(newFile)) {
|
||||
if (fs.existsSync(newFilename)) {
|
||||
Logger.warn("AddonManager", `Duplicate files found: ${filename} and ${newFilename}`);
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
// Rename the file and let it go on
|
||||
|
@ -298,7 +298,7 @@ export default class AddonManager {
|
|||
const newFilename = truncated + this.extension;
|
||||
|
||||
// If this file already exists, give a warning and move on.
|
||||
if (fs.existsSync(newFile)) {
|
||||
if (fs.existsSync(newFilename)) {
|
||||
Logger.warn("AddonManager", `Duplicate files found: ${filename} and ${newFilename}`);
|
||||
continue;
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ export default class AddonManager {
|
|||
}
|
||||
|
||||
this.saveState();
|
||||
//if (Settings.get(this.collection, this.category, this.id)) this.watchAddons();
|
||||
// if (Settings.get(this.collection, this.category, this.id)) this.watchAddons();
|
||||
return errors;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export default new class PluginManager extends AddonManager {
|
|||
get name() {return "PluginManager";}
|
||||
get moduleExtension() {return ".js";}
|
||||
get extension() {return ".plugin.js";}
|
||||
get duplicatePattern() {return /\.plugin\([0-9]+\)\.js/}
|
||||
get duplicatePattern() {return /\.plugin\([0-9]+\)\.js/;}
|
||||
get addonFolder() {return path.resolve(Config.dataPath, "plugins");}
|
||||
get prefix() {return "plugin";}
|
||||
get language() {return "javascript";}
|
||||
|
|
|
@ -14,7 +14,7 @@ export default new class ThemeManager extends AddonManager {
|
|||
get name() {return "ThemeManager";}
|
||||
get moduleExtension() {return ".css";}
|
||||
get extension() {return ".theme.css";}
|
||||
get duplicatePattern() {return /\.theme\([0-9]+\)\.css/}
|
||||
get duplicatePattern() {return /\.theme\([0-9]+\)\.css/;}
|
||||
get addonFolder() {return path.resolve(Config.dataPath, "themes");}
|
||||
get prefix() {return "theme";}
|
||||
get language() {return "css";}
|
||||
|
|
Loading…
Reference in New Issue