Skip to content

Commit

Permalink
chore: lint and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
magne4000 committed Sep 3, 2024
1 parent 12a2526 commit 1d6c111
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion boilerplates/aws/files/$README.md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default async function getReadme(props: TransformerProps) {
const todo = `
## *AWS CDK Deployment*
This is a boilerplate for deploying your Vike app to AWS using the AWS Cloud Development Kit (CDK) inkluding creating a custom domain in Route53.
This is a boilerplate for deploying your Vike app to AWS using the AWS Cloud Development Kit (CDK) including creating a custom domain in Route53.
**Architecture:**
- S3 Bucket for static client assets (\`/dist/client/assets\`).
Expand Down
1 change: 0 additions & 1 deletion boilerplates/aws/files/$package.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export default async function getPackageJson(props: TransformerProps) {
const packageJson = await loadAsJson(props);

setScripts(packageJson, {
//@ts-ignore
test: {
value: "vitest",
precedence: 0,
Expand Down
7 changes: 3 additions & 4 deletions boilerplates/aws/files/$tsconfig.json.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// files/$tsconfig.json.ts
import { loadAsJson, type TransformerProps } from "@batijs/core";
async function getTsConfig(props: TransformerProps) {

export default async function getTsConfig(props: TransformerProps) {
const tsConfig = await loadAsJson(props);
tsConfig.compilerOptions.types = [
...(tsConfig.compilerOptions.types ?? []),
"node",
"@types/node",
"vitest/globals",
"@types/which",
];
return tsConfig;
}
export { getTsConfig as default };
4 changes: 2 additions & 2 deletions boilerplates/aws/files/tests/aws_handler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it, expect, beforeAll } from "vitest";
import { beforeAll, describe, expect, it } from "vitest";

import { execSync } from "node:child_process";
import { existsSync, readdirSync, readFileSync, rmSync } from "node:fs";
Expand Down Expand Up @@ -90,7 +90,7 @@ describe("AWSHandler", () => {
});
});

/* @typescript-eslint/no-explicit-any */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type JsonData = Record<string, any>;

function extractRequestHandlerPath(jsonData: JsonData, targetCdkPath: string): string | null {
Expand Down
9 changes: 7 additions & 2 deletions boilerplates/aws/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"../tsconfig.base.json"
],
"compilerOptions": {
"types": ["node","vitest/globals","@types/which","@batijs/core/types"]
"types": [
"node",
"vitest/globals",
"@types/which",
"@batijs/core/types"
]
}
}
}
2 changes: 1 addition & 1 deletion boilerplates/hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion packages/core/src/utils/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { dim, yellow } from "colorette";
import { withIcon } from "../print.js";

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const keys = ["dev", "build", "preview", "lint", "format", "deploy"] as const;
const keys = ["dev", "build", "preview", "lint", "format", "deploy", "test"] as const;

type Scripts = (typeof keys)[number];
type ValidScripts = Scripts | `${Scripts}:${string}`;
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/tests/FRAMEWORK+aws.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { existsSync, readdirSync, readFileSync, rmSync } from "fs";
import { execSync } from "node:child_process";
import path from "path";

export const matrix = ["aws", "react", ["hono", "hattip"] /*, "eslint"*/] as const;
export const matrix = ["aws", "react", ["hono", "hattip"], "eslint"] as const;

await describeBati(({ test, expect, beforeAll, testMatch }) => {
beforeAll(
Expand Down

0 comments on commit 1d6c111

Please sign in to comment.