-
Notifications
You must be signed in to change notification settings - Fork 71
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
Linter fix #2263
Conversation
da1d50d
to
75a5016
Compare
Signed-off-by: avifenesh <[email protected]>
75a5016
to
96662cb
Compare
export type ReturnTypeRecord = { [key: string]: ReturnType }; | ||
export type ReturnTypeMap = Map<string, ReturnType>; | ||
export type ReturnTypeAttribute = { | ||
export interface ReturnTypeAttribute { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
}, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm i guess?
"lint:fix": "npm run install-linting && npx eslint -c ../eslint.config.mjs --fix", | ||
"lint": "npm run install-linting && npx eslint -c ../eslint.config.mjs", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
lint tests Signed-off-by: avifenesh <[email protected]>
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.