Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .eslintingore

This file was deleted.

46 changes: 40 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,53 @@
/**
* @type {import("eslint").Linter.Config}
*/
module.exports = {
env: {
browser: true,
es2021: true,
es2022: true,
node: true,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:import/typescript"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:import/typescript", "prettier"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
project: "tsconfig.json",
project: ["tsconfig.json"],
sourceType: "module",
},
plugins: ["@typescript-eslint"],
plugins: ["@typescript-eslint", "simple-import-sort", "unused-imports"],
rules: {
eqeqeq: "error",
"no-unused-vars": "off",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-namespace": "off",
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"@typescript-eslint/ban-types": [
"error",
{
types: {
// un-ban a type that's banned by default
"{}": false,
},
extendDefaults: true,
},
],
"@typescript-eslint/no-explicit-any": "off",
},
overrides: [
{
files: ["example/**"],
rules: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-namespace": "off",
},
},
],
};
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ package-lock.json
private_npm_cache
test/code
debug
test/kubernetes
test/argo-rollout
CHANGELOG.md
2 changes: 1 addition & 1 deletion example/readme-sample/use-extract-schema-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as Types from "@himenon/openapi-typescript-code-generator/types";

interface Option {}

const generator: Types.CodeGenerator.GenerateFunction<Option> = (payload: Types.CodeGenerator.Params[], option): string[] => {
const generator: Types.CodeGenerator.GenerateFunction<Option> = (payload: Types.CodeGenerator.Params[]): string[] => {
return payload.map(params => {
return `function ${params.operationId}() { console.log("${params.comment}") }`;
});
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@
"conventional-changelog-angular-all": "1.7.0",
"cpy": "8.1.2",
"dependency-cruiser": "12.3.0",
"eslint": "8.31.0",
"eslint": "8.34.0",
"eslint-config-prettier": "8.6.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-simple-import-sort": "^8.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"execa": "5.0.0",
"generate-changelog": "1.8.0",
"import-sort-style-module": "6.0.0",
Expand Down
Loading