diff options
| author | seth <[email protected]> | 2023-11-12 02:50:19 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-11-12 02:50:58 -0500 |
| commit | 66a32af19878f8fc341c4e74b9324ea3e7c90b84 (patch) | |
| tree | 2bb303d8ed2fa82b29665eb04dac3fdc2cd0d59c | |
| parent | 7a6fccc7b858b5497858913befb1facbe83510f2 (diff) | |
chore: refactor lint/format config
| -rw-r--r-- | .editorconfig | 4 | ||||
| -rw-r--r-- | .eslintrc.cjs | 8 | ||||
| -rw-r--r-- | .prettierrc | 6 | ||||
| -rw-r--r-- | build.ts | 6 | ||||
| -rw-r--r-- | package.json | 17 | ||||
| -rw-r--r-- | src/index.ts | 4 |
6 files changed, 27 insertions, 18 deletions
diff --git a/.editorconfig b/.editorconfig index 64ab260..d395ba4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,10 +4,12 @@ root = true [*] indent_style = tab tab_width = 2 +indent_size = "tab" end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.yml] +[*.{yml,yaml}] indent_style = space +indent_size = 2 diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index eb5dee8..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-env node */ -module.exports = { - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint"], - root: true, - ignorePatterns: ["dist/**"], -}; diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 74e9453..0000000 --- a/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "printWidth": 140, - "singleQuote": false, - "semi": true, - "useTabs": true -} @@ -27,7 +27,11 @@ const wies = (await readdir(teawieArchiveDir)).filter((wie) => { }); for (const f of wies) { - await copyFile(join(teawieArchiveDir, f), join(contentDir, "teawie", f), constants.COPYFILE_FICLONE); + await copyFile( + join(teawieArchiveDir, f), + join(contentDir, "teawie", f), + constants.COPYFILE_FICLONE, + ); } const define = { diff --git a/package.json b/package.json index 9e8f7c7..84fafed 100644 --- a/package.json +++ b/package.json @@ -28,5 +28,20 @@ "typescript": "^5.2.2", "wrangler": "^3.15.0" }, - "packageManager": "[email protected]" + "packageManager": "[email protected]", + "eslintConfig": { + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "prettier" + ], + "parser": "@typescript-eslint/parser", + "plugins": [ + "@typescript-eslint" + ], + "root": true, + "ignorePatterns": [ + "dist/**" + ] + } } diff --git a/src/index.ts b/src/index.ts index 5846a97..397dd30 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,9 @@ app.use("*", logger()); app.use("*", prettyJSON()); app.get("/", (c) => { - return c.redirect(c.env.REDIRECT_ROOT ?? "https://github.com/getchoo/teawieAPI"); + return c.redirect( + c.env.REDIRECT_ROOT ?? "https://github.com/getchoo/teawieAPI", + ); }); app.get("/static/*", async (c) => { |
