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
I was trying to add some TypeScript code and started typing camelCase methods. Then I noticed that we have adopted of a Ruby-formatting/style in tools such as https://github.com/opensearch-project/opensearch-api-specification/blob/main/tools/merger/OpenApiMerger.ts with snake_case methods and ClassNames. This was probably intended. I propose we codify this, adopt a specific/default TypeScript style guide, and add a linter for it.
What users have asked for this feature?
Future contributors.
What problems are you trying to solve?
Introduce some rules before someone like myself contributes code that looks different.
What is the developer experience going to be?
CI will fail if contribution doesn't fit the style guide and linter doesn't pass.
The text was updated successfully, but these errors were encountered:
I'm bias for spending years writing Ruby code, but I find snake_case for method names a lot more readable, especially on longer names. Even though the tools are written in TypeScript, where CamelCase is the convention, I'd still vote for snake_case.
What/Why
What are you proposing?
I was trying to add some TypeScript code and started typing
camelCase
methods. Then I noticed that we have adopted of a Ruby-formatting/style in tools such as https://github.com/opensearch-project/opensearch-api-specification/blob/main/tools/merger/OpenApiMerger.ts withsnake_case
methods andClassNames
. This was probably intended. I propose we codify this, adopt a specific/default TypeScript style guide, and add a linter for it.What users have asked for this feature?
Future contributors.
What problems are you trying to solve?
Introduce some rules before someone like myself contributes code that looks different.
What is the developer experience going to be?
CI will fail if contribution doesn't fit the style guide and linter doesn't pass.
The text was updated successfully, but these errors were encountered: