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
12 changes: 1 addition & 11 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import unicorn from 'eslint-plugin-unicorn'
import prettier from 'eslint-plugin-prettier'
Expand All @@ -8,9 +7,6 @@ export default tseslint.config(
ignores: ['node_modules', 'dist', 'build']
},

// Base ESLint recommended
eslint.configs.recommended,

// TypeScript recommended
...tseslint.configs.recommended,

Expand Down Expand Up @@ -76,13 +72,7 @@ export default tseslint.config(
Existing rule you had
=========================== */

'@typescript-eslint/no-explicit-any': 'off',

'padding-line-between-statements': [
'error',
{ blankLine: 'never', prev: 'if', next: '*' },
{ blankLine: 'never', prev: '*', next: 'if' }
]
'@typescript-eslint/no-explicit-any': 'off'
}
}
)
3 changes: 0 additions & 3 deletions example/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const discriminatorFn: BodyDiscriminatorFunction = req => {
return 'MyModelTwo'
}

// tslint:disable-next-line: max-classes-per-file
class MyModel {
get id() {
return 'my-id'
Expand All @@ -32,7 +31,6 @@ class MyModel {
name!: string
}

// tslint:disable-next-line: max-classes-per-file
class MyModelTwo extends MyModel {
type!: 'two'
}
Expand All @@ -46,7 +44,6 @@ class MyModelThree extends MyModel {

const securities = { company: [] }

// tslint:disable-next-line: max-classes-per-file
@Route()
@Tags('my-tag')
export class MyController extends Controller {
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@
},
"dependencies": {
"debug": "4.4.3",
"glob": "13.0.0",
"glob": "13.0.3",
"handlebars": "4.7.8",
"ts-morph": "27.0.2",
"yamljs": "0.3.0"
},
"devDependencies": {
"@types/debug": "4.1.12",
"@types/express": "5.0.6",
"@types/node": "25.0.9",
"@types/node": "25.2.3",
"@types/supertest": "6.0.3",
"@types/yamljs": "0.2.34",
"@typescript-eslint/eslint-plugin": "8.53.0",
"@typescript-eslint/parser": "8.53.0",
"@typescript-eslint/eslint-plugin": "8.55.0",
"@typescript-eslint/parser": "8.55.0",
"body-parser": "1.19.0",
"eslint": "9.39.2",
"eslint": "10.0.0",
"eslint-config-standard": "17.1.0",
"eslint-plugin-prettier": "5.5.5",
"eslint-plugin-unicorn": "62.0.0",
"eslint-plugin-unicorn": "63.0.0",
"express": "4.17.1",
"nyc": "17.1.0",
"openapi-types": "12.1.3",
"prettier": "3.8.0",
"prettier": "3.8.1",
"supertest": "7.2.2",
"tsx": "4.21.0",
"typescript": "5.9.3",
"typescript-eslint": "8.53.0"
"typescript-eslint": "8.55.0"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
2 changes: 0 additions & 2 deletions src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ export function addController(
)
}
// Codegen
// tslint:disable-next-line: strict-type-predicates
if (typeof codegenControllers[controllerName] === 'undefined') {
codegenControllers[controllerName] = []
}
Expand Down Expand Up @@ -514,7 +513,6 @@ function findDiscriminatorFunction(node: Identifier): {
}
// eslint-disable-next-line prefer-const
discriminatorFunction = foundFunctions[0] ?? foundVariables[0]
// tslint:disable-next-line: strict-type-predicates
if (typeof discriminatorFunction === 'undefined') {
throw new Error(
`The 2nd argument of @Body() decorator must be the name of a function defined in source files`
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ export async function generate(config: OpenAPIConfiguration) {
tableColumns.map(({ value }) => {
switch (value.type) {
case 'path':
// eslint-disable-next-line no-case-declarations
const resolved = resolveProperty(
content,
spec.components!,
Expand Down
6 changes: 0 additions & 6 deletions src/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ export function resolve(
return { $ref: buildRef('AnyValue') }
}
if (type.isTuple()) {
// OpenAPI doesn't support it, so we take it as an union of array
// tslint:disable-next-line: no-console
return {
type: 'array',
items: {
Expand All @@ -165,7 +163,6 @@ export function resolve(
const enumName = symbol.getName()
const declaration = symbol.getDeclarations()[0] as EnumDeclaration
// Add to spec components if not already resolved
// tslint:disable-next-line: strict-type-predicates
if (typeof spec.components!.schemas![enumName] === 'undefined') {
const values = declaration.getMembers().map(m => m.getValue()!)
const names = declaration.getMembers().map(m => m.getName())
Expand Down Expand Up @@ -211,7 +208,6 @@ export function resolve(
switch (helperName) {
case 'Omit':
case 'Pick':
// eslint-disable-next-line no-case-declarations
const args = typeArguments[1].isUnion()
? typeArguments[1]
.getUnionTypes()
Expand Down Expand Up @@ -304,8 +300,6 @@ export function resolve(
// For other and anonymous types, don't use ref
return resolveObjectType(type, spec)
}
// Add to spec components if not already resolved
// tslint:disable-next-line: strict-type-predicates
if (typeof spec.components!.schemas![typeName] === 'undefined') {
if (
helperName === 'Partial' ||
Expand Down
3 changes: 1 addition & 2 deletions src/runtime/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export async function validateAndParse(
break
case 'query':
value = req.query[param.name] as string | undefined | string[]
// eslint-disable-next-line no-case-declarations

const schema = param.schema!
if (
'type' in schema &&
Expand Down Expand Up @@ -282,7 +282,6 @@ function getFromRef(
if ('$ref' in schema) {
const schemaName =
schemas![schema.$ref.substr('#/components/schemas/'.length)]
// tslint:disable-next-line: strict-type-predicates
if (typeof schemaName === 'undefined') {
throw new Error(`Schema '${schema.$ref}' not found`)
}
Expand Down
2 changes: 0 additions & 2 deletions src/template/express.ts.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* tslint:disable */
/* eslint-disable */
import express from 'express'
import { RuntimeResponse, Validator } from '{{runtimeImport}}'

Expand Down
1 change: 0 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export function appendToSpec(
verb: 'get' | 'patch' | 'put' | 'delete' | 'post',
operation: OpenAPIV3.OperationObject
): void {
// tslint:disable-next-line: strict-type-predicates
if (typeof spec.paths[path] === 'undefined') {
spec.paths[path] = {}
}
Expand Down
19 changes: 0 additions & 19 deletions tslint.json

This file was deleted.

Loading
Loading