Skip to content

Commit 3024174

Browse files
authored
refactor: update deps and change directory (#98)
* refactor: api-client -> class-api-client * refactor: update
1 parent b790e44 commit 3024174

34 files changed

+189
-94
lines changed

.eslintingore

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

.eslintrc.js

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,53 @@
1+
/**
2+
* @type {import("eslint").Linter.Config}
3+
*/
14
module.exports = {
25
env: {
36
browser: true,
4-
es2021: true,
7+
es2022: true,
8+
node: true,
59
},
6-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:import/typescript"],
10+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:import/typescript", "prettier"],
711
parser: "@typescript-eslint/parser",
812
parserOptions: {
913
ecmaVersion: 12,
10-
project: "tsconfig.json",
14+
project: ["tsconfig.json"],
1115
sourceType: "module",
1216
},
13-
plugins: ["@typescript-eslint"],
17+
plugins: ["@typescript-eslint", "simple-import-sort", "unused-imports"],
1418
rules: {
19+
eqeqeq: "error",
1520
"no-unused-vars": "off",
16-
"@typescript-eslint/ban-types": "warn",
17-
"@typescript-eslint/no-namespace": "off",
21+
"unused-imports/no-unused-imports": "error",
22+
"@typescript-eslint/no-explicit-any": "error",
23+
"@typescript-eslint/no-unused-vars": [
24+
"error",
25+
{
26+
argsIgnorePattern: "^_",
27+
varsIgnorePattern: "^_",
28+
caughtErrorsIgnorePattern: "^_",
29+
},
30+
],
31+
"@typescript-eslint/ban-types": [
32+
"error",
33+
{
34+
types: {
35+
// un-ban a type that's banned by default
36+
"{}": false,
37+
},
38+
extendDefaults: true,
39+
},
40+
],
41+
"@typescript-eslint/no-explicit-any": "off",
1842
},
43+
overrides: [
44+
{
45+
files: ["example/**"],
46+
rules: {
47+
"@typescript-eslint/no-unused-vars": "off",
48+
"@typescript-eslint/no-empty-interface": "off",
49+
"@typescript-eslint/no-namespace": "off",
50+
},
51+
},
52+
],
1953
};

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ package-lock.json
88
private_npm_cache
99
test/code
1010
debug
11+
test/kubernetes
12+
test/argo-rollout
13+
CHANGELOG.md

example/readme-sample/use-extract-schema-params.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as Types from "@himenon/openapi-typescript-code-generator/types";
22

33
interface Option {}
44

5-
const generator: Types.CodeGenerator.GenerateFunction<Option> = (payload: Types.CodeGenerator.Params[], option): string[] => {
5+
const generator: Types.CodeGenerator.GenerateFunction<Option> = (payload: Types.CodeGenerator.Params[]): string[] => {
66
return payload.map(params => {
77
return `function ${params.operationId}() { console.log("${params.comment}") }`;
88
});

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@
8787
"conventional-changelog-angular-all": "1.7.0",
8888
"cpy": "8.1.2",
8989
"dependency-cruiser": "12.3.0",
90-
"eslint": "8.31.0",
90+
"eslint": "8.34.0",
9191
"eslint-config-prettier": "8.6.0",
92-
"eslint-plugin-import": "2.26.0",
92+
"eslint-plugin-import": "2.27.5",
93+
"eslint-plugin-simple-import-sort": "^8.0.0",
94+
"eslint-plugin-unused-imports": "^2.0.0",
9395
"execa": "5.0.0",
9496
"generate-changelog": "1.8.0",
9597
"import-sort-style-module": "6.0.0",

0 commit comments

Comments
 (0)