-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Description
Description
I tried setting up a JS analyzer in my VsCode config to see if any bug can be easily identified in the source code. And I tried experimenting with jsconfig.json
.
{
"compilerOptions": {
"checkJs": true,
"lib": [] // Do not include dom ('Node' namespace conflict)
},
"include": [
"src/**/*",
"examples/**/*"
]
}
This is just a little experiment but I find out two points in which this type of config might be usefull:
- It allows to elevate types from the JSdoc and see incoherences in the used types, ex:
// src\nodes\code\ScriptableNode.js::453
// type of getOutput should be a ScriptableValueNode
- It allows to detect missing/broken call to functions, ex:
// src\nodes\code\ScriptableNode.js::483
There is a lot of false positives or missing type references but I might be handy to look at it from time to time to detect types inconsistency and possible errors.
Solution
Use this config at the end of a documentation or development cycle to analyze possible errors.
Alternatives
Stay with the current config with less visibility on the structure of types but a faster way to document and implement things without taking to much attention to possible errors.
Additional context
Just wanted to share in case it might help the core team :)