Skip to content

Commit 5541c84

Browse files
committed
chore: update dependencies
1 parent d8dc472 commit 5541c84

19 files changed

+2934
-5543
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
32

43
npm run format

.husky/pre-push

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
32

43
npm run lint
54
npm run test:ci

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const response = await fetch(
1616
parameters: {
1717
path: { petId: 42 }, // typed path parameter
1818
},
19-
}
19+
},
2020
);
2121

2222
const data = await response.json();
@@ -81,7 +81,7 @@ const response = await fetch(
8181
parameters: {
8282
path: { petId: 42 }, // typed path parameter
8383
},
84-
}
84+
},
8585
);
8686
```
8787

@@ -151,10 +151,10 @@ const fetch = createFetch<paths>();
151151

152152
export async function fetchGet<
153153
GetPath extends SubPaths<paths, "get">,
154-
Operation extends paths[GetPath]["get"]
154+
Operation extends paths[GetPath]["get"],
155155
>(
156156
path: GetPath,
157-
options: FetchOptions<Operation>
157+
options: FetchOptions<Operation>,
158158
): Promise<{
159159
data?: ResponseBodySuccess<Operation>;
160160
error?: ResponseBodyError<Operation>;

eslint.config.mjs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
3+
import globals from "globals";
4+
import tsParser from "@typescript-eslint/parser";
5+
import path from "node:path";
6+
import { fileURLToPath } from "node:url";
7+
import js from "@eslint/js";
8+
import { FlatCompat } from "@eslint/eslintrc";
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
16+
});
17+
18+
export default defineConfig([
19+
globalIgnores(["**/dist/", "**/node_modules/"]),
20+
{
21+
extends: compat.extends(
22+
"eslint:recommended",
23+
"plugin:@typescript-eslint/recommended",
24+
"prettier"
25+
),
26+
27+
plugins: {
28+
"@typescript-eslint": typescriptEslint,
29+
},
30+
31+
languageOptions: {
32+
globals: {
33+
...globals.browser,
34+
},
35+
36+
parser: tsParser,
37+
ecmaVersion: "latest",
38+
sourceType: "module",
39+
},
40+
41+
rules: {
42+
"@typescript-eslint/ban-ts-comment": "off",
43+
"@typescript-eslint/no-explicit-any": "off",
44+
"@typescript-eslint/no-unused-vars": "warn",
45+
"require-await": "error",
46+
},
47+
},
48+
]);

0 commit comments

Comments
 (0)