diff --git a/.eslintrc b/.eslintrc index 3da8030..a956125 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,13 @@ { "parser": "@typescript-eslint/parser", - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], - "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended" + ], + "plugins": [ + "@typescript-eslint", + "eslint-plugin-tsdoc" + ], "root": true, "env": { "browser": false, @@ -18,7 +24,11 @@ "rules": { "@typescript-eslint/no-unused-vars": [ "warn", - { "vars": "all", "args": "after-used", "ignoreRestSiblings": true } + { + "vars": "all", + "args": "after-used", + "ignoreRestSiblings": true + } ], "no-useless-catch": "warn", "@typescript-eslint/no-extra-semi": "off", @@ -26,18 +36,42 @@ "@typescript-eslint/no-explicit-any": "off", "padding-line-between-statements": [ "error", - { "blankLine": "always", "prev": ["block", "block-like"], "next": "*" }, - { "blankLine": "always", "prev": "*", "next": ["block", "block-like"] }, + { + "blankLine": "always", + "prev": [ + "block", + "block-like" + ], + "next": "*" + }, + { + "blankLine": "always", + "prev": "*", + "next": [ + "block", + "block-like" + ] + }, { "blankLine": "any", - "prev": ["singleline-const", "singleline-let", "expression"], - "next": ["block", "block-like"] - } - ] + "prev": [ + "singleline-const", + "singleline-let", + "expression" + ], + "next": [ + "block", + "block-like" + ] + }, + ], + "tsdoc/syntax": "warn" }, "overrides": [ { - "files": ["*.tsx"], + "files": [ + "*.tsx" + ], "rules": { "no-undef": "off" } @@ -47,4 +81,4 @@ "globals": { "__DEV__": true } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 79ef0ab..c26ffed 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "ts-dedent": "^2.2.0", "uuid": "^9.0.0", "zod": "^3.21.4", - "zod-to-json-schema": "^3.21.1", + "zod-to-json-schema": "^3.21.2", "zod-to-ts": "^1.1.4", "zod-validation-error": "^1.3.0" }, @@ -79,8 +79,9 @@ "@typescript-eslint/parser": "^5.59.11", "ava": "^5.3.1", "del-cli": "^5.0.0", - "dotenv": "^16.3.0", + "dotenv": "^16.3.1", "eslint": "^8.43.0", + "eslint-plugin-tsdoc": "^0.2.17", "expect-type": "^0.16.0", "hash-obj": "^4.0.0", "husky": "^8.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 81f7afc..f3c94b7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' settings: autoInstallPeers: true @@ -84,8 +84,8 @@ dependencies: specifier: ^3.21.4 version: 3.21.4 zod-to-json-schema: - specifier: ^3.21.1 - version: 3.21.1(zod@3.21.4) + specifier: ^3.21.2 + version: 3.21.2(zod@3.21.4) zod-to-ts: specifier: ^1.1.4 version: 1.1.4(typescript@5.1.3)(zod@3.21.4) @@ -125,11 +125,14 @@ devDependencies: specifier: ^5.0.0 version: 5.0.0 dotenv: - specifier: ^16.3.0 - version: 16.3.0 + specifier: ^16.3.1 + version: 16.3.1 eslint: specifier: ^8.43.0 version: 8.43.0 + eslint-plugin-tsdoc: + specifier: ^0.2.17 + version: 0.2.17 expect-type: specifier: ^0.16.0 version: 0.16.0 @@ -890,6 +893,19 @@ packages: - supports-color dev: true + /@microsoft/tsdoc-config@0.16.2: + resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + ajv: 6.12.6 + jju: 1.4.0 + resolve: 1.19.0 + dev: true + + /@microsoft/tsdoc@0.14.2: + resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} + dev: true + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1766,8 +1782,8 @@ packages: esutils: 2.0.3 dev: true - /dotenv@16.3.0: - resolution: {integrity: sha512-tHB+hmf8MRCkT3VVivGiG8kq9HiGTmQ3FzOKgztfpJQH1IWuZTOvKSJmHNnQPowecAmkCJhLrxdPhOr06LLqIQ==} + /dotenv@16.3.1: + resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} engines: {node: '>=12'} dev: true @@ -1941,6 +1957,13 @@ packages: engines: {node: '>=12'} dev: true + /eslint-plugin-tsdoc@0.2.17: + resolution: {integrity: sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + dev: true + /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -2794,6 +2817,10 @@ packages: resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} dev: true + /jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + dev: true + /joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} @@ -3795,6 +3822,13 @@ packages: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true + /resolve@1.19.0: + resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} + dependencies: + is-core-module: 2.12.1 + path-parse: 1.0.7 + dev: true + /resolve@1.22.2: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true @@ -4603,8 +4637,8 @@ packages: engines: {node: '>=12.20'} dev: true - /zod-to-json-schema@3.21.1(zod@3.21.4): - resolution: {integrity: sha512-y5g0MPxDq+YG/T+cHGPYH4PcBpyCqwK6wxeJ76MR563y0gk/14HKfebq8xHiItY7lkc9GDFygCnkvNDTvAhYAg==} + /zod-to-json-schema@3.21.2(zod@3.21.4): + resolution: {integrity: sha512-02yfKymfmIf2rM/5LYGlyw0daEel/f3MsSGMNJZWWf44ato+Y+diFugOpDtgvEUn3cYM5oDAGWW2NHeSD4mByw==} peerDependencies: zod: ^3.21.4 dependencies: