Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated typeParameters #1229

Merged
merged 6 commits into from
May 15, 2024
Merged

Deprecated typeParameters #1229

merged 6 commits into from
May 15, 2024

Conversation

aidvu
Copy link
Contributor

@aidvu aidvu commented May 14, 2024

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 added 2 commits May 14, 2024 11:52
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
Copy link
Contributor Author

aidvu commented May 14, 2024

[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
Copy link
Collaborator

brettz9 commented May 14, 2024

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
Copy link
Contributor Author

aidvu commented May 14, 2024

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
Copy link
Contributor Author

aidvu commented May 15, 2024

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 brettz9 merged commit d417d05 into gajus:main May 15, 2024
4 checks passed
@brettz9
Copy link
Collaborator

brettz9 commented May 15, 2024

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

Copy link

🎉 This PR is included in version 48.2.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants