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

Linter fix #2263

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Linter fix #2263

merged 1 commit into from
Sep 10, 2024

Conversation

avifenesh
Copy link
Member

@avifenesh avifenesh commented Sep 10, 2024

Migrated all our linting to the modern standard and modern tools and lint and format all base on it.
Most of the changes are the change between type to interface, interface is closer to the JS under, hence result in better performance.

@avifenesh avifenesh requested a review from a team as a code owner September 10, 2024 09:31
@avifenesh avifenesh force-pushed the linter-fix branch 8 times, most recently from da1d50d to 75a5016 Compare September 10, 2024 11:23
Signed-off-by: avifenesh <[email protected]>
export type ReturnTypeRecord = { [key: string]: ReturnType };
export type ReturnTypeMap = Map<string, ReturnType>;
export type ReturnTypeAttribute = {
export interface ReturnTypeAttribute {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you changed to interface? did you changed it to all types?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interface is recommended by ts since it's behave like the JS under the hood and led to better performance, unless there's a specific need the recommendation is to use interface.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that it is legal in TypeScript for multiple interfaces with the same name to be created. TypeScript will merge interfaces with the same name. Types cannot be merged. If you try to define the same type twice, TypeScript will throw an error.

@avifenesh avifenesh merged commit 2af1e9b into valkey-io:main Sep 10, 2024
15 checks passed
@avifenesh avifenesh deleted the linter-fix branch September 10, 2024 11:51
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we lint this file as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm i guess?

Comment on lines +39 to +40
"lint:fix": "npm run install-linting && npx eslint -c ../eslint.config.mjs --fix",
"lint": "npm run install-linting && npx eslint -c ../eslint.config.mjs",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should include prettier as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought about it, didn't know if do or not. If you think so its enough for me, will do.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need this? Why in repo root?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use it for many directory, not just node. Benchmarks, external tests etc.
Instead of installing for each, and using the config anyhow from root, its easier like that. As well as for the CI.

janhavigupta007 pushed a commit to janhavigupta007/glide-for-redis that referenced this pull request Sep 11, 2024
lint tests

Signed-off-by: avifenesh <[email protected]>
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 this pull request may close these issues.

3 participants