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

Remove aliases in time.ts #229

Closed
axmmisaka opened this issue Sep 6, 2023 · 1 comment · Fixed by #236
Closed

Remove aliases in time.ts #229

axmmisaka opened this issue Sep 6, 2023 · 1 comment · Fixed by #236
Assignees

Comments

@axmmisaka
Copy link
Collaborator

In time.ts we have time units and their aliases.

This is the main reason why #227 is failing linting because of a newly introduced linting rule.

In the code generator, the canonical name of time units are all singular. Plural forms are all aliases and (I believe) won't be included in the generated code.

We should remove the aliases to make eslint happy and to improve code quality.

export enum TimeUnit {
nsec = 1,
usec = 1000,
msec = 1000000,
sec = 1000000000,
secs = 1000000000,
minute = 60000000000,
minutes = 60000000000,
hour = 3600000000000,
hours = 3600000000000,
day = 86400000000000,
days = 86400000000000,
week = 604800000000000,
weeks = 604800000000000
}

https://github.com/lf-lang/lingua-franca/blob/4dbd9f822d1c769f37de179d00deb87aeff5f6d4/core/src/main/java/org/lflang/TimeUnit.java#L40-L58

@axmmisaka axmmisaka self-assigned this Sep 6, 2023
@lhstrh
Copy link
Member

lhstrh commented Sep 6, 2023

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants