Skip to content

Commit 7f05ecb

Browse files
committed
chore: lint
1 parent 0af5e4a commit 7f05ecb

4 files changed

Lines changed: 7 additions & 11 deletions

File tree

.eslintrc.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
22
root: true,
3-
extends: ['@block65/eslint-config', '@block65/eslint-config/typescript'],
3+
extends: ['@block65/eslint-config/typescript'],
44
parserOptions: {
55
tsconfigRootDir: __dirname,
6-
project: './tsconfig.json',
6+
project: true,
77
},
88
};

babel.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,5 @@ export default {
22
presets: [
33
['@babel/preset-env', { targets: { node: 'current' }, modules: false }],
44
['@babel/preset-typescript'],
5-
/* [
6-
'@babel/preset-react',
7-
{
8-
runtime: 'automatic',
9-
},
10-
], */
115
],
126
};

lib/process-schema.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function schemaToType(
107107

108108
const maybeJsDoc = {
109109
...(schemaObject.description && {
110-
description: wordWrap('\n' + schemaObject.description),
110+
description: wordWrap(`\n${schemaObject.description}`),
111111
}),
112112
...(jsdocTags.length > 0 && { tags: jsdocTags }),
113113
};
@@ -241,7 +241,8 @@ export function schemaToType(
241241
return {
242242
name,
243243
hasQuestionToken: true,
244-
type: 'null',
244+
type: maybeWithUndefined('null', true),
245+
docs,
245246
};
246247
}
247248

@@ -503,6 +504,7 @@ export function registerTypesFromSchema(
503504
name: pascalCase(schemaName),
504505
isExported: true,
505506
type: withNullUnion(
507+
// eslint-disable-next-line no-template-curly-in-string
506508
options?.integerAsStringish ? '`${number}`' : schemaObject.type,
507509
schemaObject.nullable,
508510
),

lib/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import camelcase from 'camelcase';
2-
import wrap from 'word-wrap';
32
import type { OpenAPIV3_1 } from 'openapi-types';
3+
import wrap from 'word-wrap';
44

55
export function maybeJsDocDescription(
66
...str: (string | undefined | false | null)[]

0 commit comments

Comments
 (0)