1
0
mirror of https://github.com/barthuijgen/factorio-sites.git synced 2024-11-21 18:16:33 +02:00

fix linting

This commit is contained in:
Bart 2021-12-07 00:20:15 +01:00
parent 10ad37a6f4
commit 001b707850
5 changed files with 10 additions and 13 deletions

View File

@ -75,6 +75,7 @@ export const functionHttpHandler: Handler = async (req, res) => {
await saveBlueprintImage(blueprint.image_hash, min_image, "300");
res.status(200).send("Done");
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (reason: any) {
res.status(500).send(`Error rendering image ${reason.stack || reason}`);
}

View File

@ -60,6 +60,7 @@ export async function subscribeToPubSub() {
await saveBlueprintImage(blueprint.image_hash, min_image, "300");
return ack("[pubsub] image saved", true);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (reason: any) {
return ack(`[pubsub:error] ${reason.stack || reason}`, false);
}

View File

@ -2,9 +2,7 @@
"extends": [
"plugin:@nrwl/nx/react-typescript",
"../../.eslintrc.json",
"plugin:@next/next/recommended",
"next",
"next/core-web-vitals"
"plugin:@next/next/recommended"
],
"ignorePatterns": ["!**/*"],
"env": {
@ -288,7 +286,7 @@
"project": ["apps/blueprints/tsconfig(.*)?.json"]
},
"rules": {
"@next/next/no-html-link-for-pages": ["error", "apps/blueprints/pages"]
"@next/next/no-html-link-for-pages": ["error", "apps/blueprints/src/pages"]
}
},
{

View File

@ -6,14 +6,11 @@ import {
import { apiHandler } from "../../utils/api-handler";
const handler = apiHandler(async (_, res) => {
// const [entities, items, recipes] = await Promise.all([
// getBlueprintEntities(),
// getBlueprintItems(),
// getBlueprintRecipes(),
// ]);
const entities = [] as any[];
const items = [] as any;
const recipes = [] as any;
const [entities, items, recipes] = await Promise.all([
getBlueprintEntities(),
getBlueprintItems(),
getBlueprintRecipes(),
]);
res.status(200).json({ entities, items, recipes });
});

View File

@ -1,5 +1,5 @@
import { comment, blueprint, user } from "@prisma/client";
import { Icon, Signal } from "./blueprint-string";
import { Signal } from "./blueprint-string";
export interface ChildTreeBlueprint {
type: "blueprint";