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
{{ message }}
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
Is your feature request related to a problem? Please describe.
Working on the recent refactoring has been frustrating as javascript offers practically no way to enforce contracts between different functions (in terms of what values they expect and return). This makes it difficult to keep the codebase in sync when changing the object layout of a return value or a parameter.
We have currently been using JSdoc as a bandaid to get some help from VSCode autocomplete but its power is limited.
Describe the solution you'd like
Using typescript in some places (not necessarily converting the whole code base) could let us define schemas for common data types and check that we do not misuse them. Possible use cases:
Describe the schema of linter json output
Enforce the GitHub checks report object schema as the output of the report merging code
Enforce a common interface on all linter runner classes
An other reoccurring has been passing too few parameters to some functions that then silently fail in obscure cases.
Describe alternatives you've considered
It may be possible to write more complex JSDoc rules but these only help autocompletion, they do not generate build errors.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Working on the recent refactoring has been frustrating as javascript offers practically no way to enforce contracts between different functions (in terms of what values they expect and return). This makes it difficult to keep the codebase in sync when changing the object layout of a return value or a parameter.
We have currently been using JSdoc as a bandaid to get some help from VSCode autocomplete but its power is limited.
Describe the solution you'd like
Using typescript in some places (not necessarily converting the whole code base) could let us define schemas for common data types and check that we do not misuse them. Possible use cases:
An other reoccurring has been passing too few parameters to some functions that then silently fail in obscure cases.
Describe alternatives you've considered
It may be possible to write more complex JSDoc rules but these only help autocompletion, they do not generate build errors.
The text was updated successfully, but these errors were encountered: