You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #10559 fails due to linter errors about a lint that probably should not be enabled.
The use of typedef lint was added to vscode-cpptools in #1403 with the comment “explicit types is recommended Typescript practice”, but this is not correct. Actually, the documentation for this lint explicitly states the opposite:
Requiring type annotations unnecessarily can be cumbersome to maintain and generally reduces code readability. TypeScript is often better at inferring types than easily written type annotations would allow.
Instead of enabling typedef, it is generally recommended to use the --noImplicitAny and --strictPropertyInitialization compiler options to enforce type annotations only when useful.
The compiler is already using the given flags as strict: true is set, so I would recommend to remove this lint as it adds line noise and runs against best practices.
Let me know your thoughts. Thanks!
The text was updated successfully, but these errors were encountered:
I'm ok to change the rule. CMake Tools doesn't have it, and I think it's nice not to have to declare types in some cases where it is obvious what it is.
PR #10559 fails due to linter errors about a lint that probably should not be enabled.
The use of
typedef
lint was added to vscode-cpptools in #1403 with the comment “explicit types is recommended Typescript practice”, but this is not correct. Actually, the documentation for this lint explicitly states the opposite:The compiler is already using the given flags as
strict: true
is set, so I would recommend to remove this lint as it adds line noise and runs against best practices.Let me know your thoughts. Thanks!
The text was updated successfully, but these errors were encountered: