mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 10:15:31 +00:00
Resolve lint errors
This commit is contained in:
parent
ef8a0b083e
commit
4130b4eafb
5 changed files with 6 additions and 6 deletions
|
|
@ -162,7 +162,6 @@
|
|||
"import/no-duplicates": "error",
|
||||
"import/no-extraneous-dependencies": "error",
|
||||
"import/no-named-as-default-member": "error",
|
||||
"import/no-unresolved": "error",
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "error"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Message } from "discord.js";
|
|||
import { getStats, getClassicSkinCount } from "../../data/skins";
|
||||
|
||||
async function handler(message: Message): Promise<void> {
|
||||
let classic = await getClassicSkinCount();
|
||||
const classic = await getClassicSkinCount();
|
||||
const { tweeted, approved, rejected, tweetable } = await getStats();
|
||||
await message.channel.send(`Unique Skins: ${classic.toLocaleString()}
|
||||
Tweeted: ${tweeted.toLocaleString()}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ app.post("/skins/", async (req, res) => {
|
|||
res.status(500).send({ error: "No file supplied" });
|
||||
return;
|
||||
}
|
||||
result = await addSkinFromBuffer(upload.data, upload.name, "Web API");
|
||||
const result = await addSkinFromBuffer(upload.data, upload.name, "Web API");
|
||||
res.json({ ...result, filename: upload.name });
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ function putSkin(md5, buffer) {
|
|||
const key = `skins/${md5}.wsz`;
|
||||
s3.putObject(
|
||||
{ Bucket: bucketName, Key: key, Body: buffer, ACL: "public-read" },
|
||||
err => {
|
||||
(err) => {
|
||||
if (err) {
|
||||
rejectPromise(err);
|
||||
return;
|
||||
|
|
@ -54,7 +54,7 @@ function putScreenshot(md5, buffer) {
|
|||
const key = `screenshots/${md5}.png`;
|
||||
s3.putObject(
|
||||
{ Bucket: bucketName, Key: key, Body: buffer, ACL: "public-read" },
|
||||
err => {
|
||||
(err) => {
|
||||
if (err) {
|
||||
rejectPromise(err);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -629,12 +629,14 @@ function MakiChildren({ makiObject }) {
|
|||
|
||||
// Given a skin XML node, pick which component to use, and render it.
|
||||
const Maki = React.memo(({ makiObject }) => {
|
||||
useJsUpdates(makiObject);
|
||||
let { name } = makiObject;
|
||||
if (name == null) {
|
||||
// name is null is likely a comment
|
||||
return null;
|
||||
}
|
||||
name = name.toLowerCase();
|
||||
|
||||
if (
|
||||
name === "groupdef" ||
|
||||
name === "elements" ||
|
||||
|
|
@ -646,7 +648,6 @@ const Maki = React.memo(({ makiObject }) => {
|
|||
// these nodes dont need to be rendered
|
||||
return null;
|
||||
}
|
||||
useJsUpdates(makiObject);
|
||||
const Component = NODE_NAME_TO_COMPONENT[name] || DummyComponent;
|
||||
return <Component makiObject={makiObject} />;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue