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

Update lint rules to enforce explicit return type annotations #2156

Open
vvidday opened this issue Mar 11, 2024 · 1 comment
Open

Update lint rules to enforce explicit return type annotations #2156

vvidday opened this issue Mar 11, 2024 · 1 comment

Comments

@vvidday
Copy link
Contributor

vvidday commented Mar 11, 2024

What feature(s) would you like to see in RepoSense

With #2002 being worked on, it would be beneficial to add lint rule(s) to enforce typescript functions to have explicit return type annotations. This will ensure that future additions comply with the existing coding standard, and enforce uniformity across the codebase.

Is the feature request related to a problem?

If this is not added, future functions might omit explicit return types, which would result in inconsistency across the frontend codebase.

If possible, describe the solution

Add lint rule(s) to enforce explicit return types for functions. Example: https://typescript-eslint.io/rules/explicit-function-return-type/
We should make sure that the linter works for both raw .ts files and for TypeScript code inside .vue files. This rule should of course be added after the rule has been enforced across the existing code base (i.e. after #2002 is finished & closed).

Additionally, since this will be enforced as a rule, please also update the style guide in the DG to specify this rule.

If applicable, describe alternatives you've considered

Additional context

@logical-1985516
Copy link
Contributor

logical-1985516 commented Jul 28, 2024

Hi @vvidday, may I try this issue? I know that issue #2002 is still open (for .ts files), but may I work on this issue and create a PR with a s.DoNotMerge label?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants