Skip to content

Commit 1047ac1

Browse files
authored
style: apply code format (biome check --write .) (#143)
1 parent b8a4aba commit 1047ac1

140 files changed

Lines changed: 271 additions & 269 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
pnpm build
3636
pnpm type-check
3737
pnpm test:code:gen
38+
pnpm lint
3839
pnpm test
3940
env:
4041
CI: true

biome.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.4.12/schema.json",
33
"assist": { "actions": { "source": { "organizeImports": "on" } } },
44
"formatter": {
55
"enabled": true,
@@ -21,12 +21,26 @@
2121
"useNumberNamespace": "error",
2222
"noInferrableTypes": "error",
2323
"noUselessElse": "error"
24+
},
25+
"correctness": {
26+
"noUnusedImports": "error"
27+
},
28+
"suspicious": {
29+
"noExplicitAny": "off",
30+
"useIterableCallbackReturn": "off"
31+
},
32+
"performance": {
33+
"noAccumulatingSpread": "off"
34+
},
35+
"complexity": {
36+
"noStaticOnlyClass": "off",
37+
"noBannedTypes": "off"
2438
}
2539
}
2640
},
2741
"files": {
2842
"ignoreUnknown": true,
29-
"includes": ["**", "!**/dist"],
43+
"includes": ["**", "!**/dist", "!coverage", "!examples", "!test/code"],
3044
"maxSize": 10485760
3145
},
3246
"javascript": {

examples/apis/codegen.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import * as fs from "fs";
2-
31
import { CodeGenerator } from "@himenon/openapi-typescript-code-generator";
42
import * as Templates from "@himenon/openapi-typescript-code-generator/dist/templates";
5-
import * as Types from "@himenon/openapi-typescript-code-generator/dist/types";
3+
import type * as Types from "@himenon/openapi-typescript-code-generator/dist/types";
4+
import * as fs from "fs";
65

76
const main = () => {
87
const codeGenerator = new CodeGenerator("./spec/openapi.yml");

examples/apis/sample-axios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as axios from "axios";
22

3-
import { ApiClient, RequestArgs, createClient } from "./client";
3+
import { type ApiClient, createClient, type RequestArgs } from "./client";
44
import { generateQueryString } from "./utils";
55

66
export interface RequestOption {

examples/apis/sample-debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApiClient, RequestArgs, createClient } from "./client";
1+
import { type ApiClient, createClient, type RequestArgs } from "./client";
22
import { generateQueryString } from "./utils";
33

44
export interface RequestOption {

examples/apis/sample-fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fetch from "node-fetch";
22

3-
import { ApiClient, RequestArgs, createClient } from "./client";
3+
import { type ApiClient, createClient, type RequestArgs } from "./client";
44
import { generateQueryString } from "./utils";
55

66
export interface RequestOption {

examples/apis/sample-superagent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import superagent from "superagent";
22

3-
import { ApiClient, RequestArgs, createClient } from "./client";
3+
import { type ApiClient, createClient, type RequestArgs } from "./client";
44
import { generateQueryString } from "./utils";
55

66
export interface RequestOption {

examples/apis/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as Formatter from "@himenon/openapi-parameter-formatter";
22

3-
import { QueryParameters } from "./client";
3+
import type { QueryParameters } from "./client";
44

55
export const generateQueryString = (queryParameters: QueryParameters | undefined): string | undefined => {
66
if (!queryParameters) {

examples/pure-js/gen.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import * as fs from "fs";
2-
31
import { CodeGenerator } from "@himenon/openapi-typescript-code-generator";
2+
import * as fs from "fs";
43

54
const main = () => {
65
const codeGenerator = new CodeGenerator("spec/openapi.yml");

examples/readme-sample/ast-code-template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { TsGenerator } from "@himenon/openapi-typescript-code-generator/dist/api";
2-
import * as Types from "@himenon/openapi-typescript-code-generator/dist/types";
2+
import type * as Types from "@himenon/openapi-typescript-code-generator/dist/types";
33

44
type Option = {};
55

0 commit comments

Comments
 (0)