gajus / eslint-plugin-jsdoc

JSDoc specific linting rules for ESLint.
Other
1.07k stars 155 forks source link

Deprecated `typeParameters` #1229

Closed aidvu closed 1 month ago

aidvu commented 1 month ago

https://typescript-eslint.io/troubleshooting/#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings

typeParameters are deprecated, and should use typeArguments instead. Allow fallback to typeParameters to maintain backward compatibility.

aidvu commented 1 month ago
[11:08:35]W:     [Step 2/3] (node:45) DeprecationWarning: The 'typeParameters' property is deprecated on NewExpression nodes. Use 'typeArguments' instead. See https://typescript-eslint.io/linting/troubleshooting#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.
[11:08:35]W:     [Step 2/3]     at Object.defineProperty.get (/node_modules/@typescript-eslint/typescript-estree/dist/convert.js:2529:29)
[11:08:35]W:     [Step 2/3]     at isVoidPromise (/node_modules/eslint-plugin-jsdoc/dist/utils/hasReturnValue.cjs:28:150)
[11:08:35]W:     [Step 2/3]     at hasReturnValue (/node_modules/eslint-plugin-jsdoc/dist/utils/hasReturnValue.cjs:59:99)
[11:08:35]W:     [Step 2/3]     at /node_modules/eslint-plugin-jsdoc/dist/utils/hasReturnValue.cjs:442:19
[11:08:35]W:     [Step 2/3]     at Object.hasValueOrExecutorHasNonEmptyResolveValue (/node_modules/eslint-plugin-jsdoc/dist/utils/hasReturnValue.cjs:464:10)
[11:08:35]W:     [Step 2/3]     at utils.hasValueOrExecutorHasNonEmptyResolveValue (/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.cjs:1376:32)
[11:08:35]W:     [Step 2/3]     at exports.default.meta.docs.description (/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsCheck.cjs:79:213)
[11:08:35]W:     [Step 2/3]     at iterate (/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.cjs:1744:3)
[11:08:35]W:     [Step 2/3]     at checkJsdoc (/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.cjs:2087:9)
[11:08:35]W:     [Step 2/3]     at ruleErrorHandler (/node_modules/eslint/lib/linter/linter.js:1076:28)
[11:08:35]W:     [Step 2/3] Process exited with code 1
brettz9 commented 1 month ago

If the failing TypeScript tests are just a temporary problem, you could add a // @ts-expect-error comment above the line. I think we also need a test.

aidvu commented 1 month ago

Can take a look tomorrow. Thanks!

Tho fwiw @brettz9, not sure if temporary or not. Guess I need to read more docs to figure how all of this works, haha. :)

aidvu commented 1 month ago

I think build/lint is fixed. Do you have an example of a test (any test fwiw) I can take a look for this?

Edit: I guess requireReturnsCheck.js? But I see tests for void returns there. Code coverage is at 100%. Only way to test it would be to have a separate workflow, to do typescript-eslint v5.

brettz9 commented 1 month ago

Thanks for the PR! (and nevermind on the test then)

github-actions[bot] commented 1 month ago

:tada: This PR is included in version 48.2.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: