diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 7ed2f5b8..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @type {import("eslint").Linter.Config} */ -module.exports = { - extends: ["airbnb-typescript-prettier"], - rules: { - // for-of 構文を使いたい - "no-restricted-syntax": "off", - // TypeScript と相性が悪い - "react/require-default-props": "off", - "react/jsx-props-no-spreading": "off", - }, - ignorePatterns: ["/public/**"], -}; diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a2ecea20..84961e89 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -5,17 +5,23 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 with: bun-version: "1.2.4" - run: bun install --frozen-lockfile - run: bun check + typos: + name: Check Typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@v1 build: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 with: bun-version: "1.2.4" diff --git a/.helix/languages.toml b/.helix/languages.toml index a1baf64a..481e73a5 100644 --- a/.helix/languages.toml +++ b/.helix/languages.toml @@ -1,5 +1,7 @@ -[language-servers] -astro-ls = { command = "astro-ls", args = ["--stdio"] } +[language-servers.astro-ls] +command = "astro-ls" +args = ["--stdio"] +config = { contentIntellisense = true } # not working? [[language]] name = "astro" @@ -14,3 +16,8 @@ formatter = { command = "bun", args = ["prettier", "--parser", "typescript"] } name = "svelte" formatter = { command = "bun", args = ["prettier", "--parser", "svelte"] } auto-format = true + +[[language]] +name = "markdown" +file-types = ["md", "mdx"] +language-servers = ["astro-ls"] diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 3c032078..00000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -18 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 30810fab..9a8a6908 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["astro-build.astro-vscode"] + "recommendations": ["astro-build.astro-vscode", "tekumara.typos-vscode"] } diff --git a/README.md b/README.md index 4bc646f1..e85d6b03 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ ### ローカル - (必須) Bun >= v1.1.39 -- 任意のエディタ https://docs.astro.build/en/editor-setup/ +- (推奨) Typos +- 任意のエディタ ```sh bun install --frozen-lockfile diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 00000000..454089ba --- /dev/null +++ b/_typos.toml @@ -0,0 +1,2 @@ +[default.extend-words] +progate = "progate" diff --git a/lefthook.yml b/lefthook.yml index 4bab75ca..e81fce92 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -10,3 +10,5 @@ pre-commit: stage_fixed: true sync: run: bun sync + typos: + run: if command -v typos 2&> /dev/null; then typos; fi diff --git a/package.json b/package.json index f2590021..3ce3969d 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "website", - "version": "3.1.0", - "private": true, + "homepage": "https://utcode.net", "description": "website of ut.code();, version 3", - "author": "aster-void and others", - "type": "module", + "private": true, + "version": "3.1.1", "keywords": [ "astro", "ut.code();" ], + "type": "module", "scripts": { "prepare": "lefthook install && bun sync", "sync": "astro sync", diff --git a/shell.nix b/shell.nix index 43db9070..34939c29 100644 --- a/shell.nix +++ b/shell.nix @@ -3,6 +3,9 @@ pkgs.mkShell { packages = [ pkgs.bun pkgs.biome + pkgs.astro-language-server pkgs.nodejs-slim # required by astro to find sharp + pkgs.typos + pkgs.typos-lsp ]; } diff --git a/src/schema.ts b/src/schema.ts index f1d2541e..74cf70f9 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -8,8 +8,6 @@ export type Project = z.infer>; export const CreateArticleSchema = ({ image }: { image: ImageFunction }) => z.object({ - // excerpt: z.string().nullable(), - // longExcerpt: z.string().nullable(), date: z .date() .transform((date) => new TZDate(date).withTimeZone("Asia/Tokyo")), diff --git a/tsconfig.json b/tsconfig.json index 5a89c962..2c3da799 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,5 +20,5 @@ } }, "include": [".astro/types.d.ts", "**/*"], - "exclude": ["dist"] + "exclude": ["dist", ".direnv"] }