-
Notifications
You must be signed in to change notification settings - Fork 90
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
ESLint TS7016 #120
Comments
I believe this is related to TypeScript 5, this is a new major version that has been released a couple months ago and I will need to check and adjust types for JustValidate |
There is a general discussion of the topic here: One of the Microsoft typescript contributors made this little tool that might help to see what the problem is: https://arethetypeswrong.github.io/?p=just-validate%404.3.0 Temporary fixDigging in the typescript thread I found a patch solution to the problem, using the patch-package npm package. You fix the problem by editing the problem package (in this case These 4 steps removed the problem and gave me correct types for Install npm i -D patch-package Add this line to your "scripts": {
"postinstall": "patch-package"
}, Navigate to "exports": {
".": {
"import": "./dist/just-validate.es.js",
"require": "./dist/just-validate.production.min.js"
}
}, Run this in the root of your project to create the patch: npx patch-package just-validate --exclude "nothing" (the This creates a |
Describe the bug
I'm using just-validate inside a Vite React Typescript project.
The library works well and the code compiles successfully but i see this annoying error message from ESLint:
Is there any way to fix it?
To Reproduce
Expected behavior
No error or warnings.
My package.json
The text was updated successfully, but these errors were encountered: