jsPsych icon indicating copy to clipboard operation
jsPsych copied to clipboard

Respect JavaScript naming conventions

Open joshunrau opened this issue 1 year ago • 2 comments

I have just starting using this package and am really enjoying it! However, I have noticed methods are named inconsistently (some with camelCase, some with snake_case). Since this is a JavaScript package, I would propose using camelCase for all method, function, or variable names. The old snake_case names can be deprecated and aliased to the camelCase names without causing any breaking changes. If it would be helpful, I can make a PR for this.

joshunrau avatar Aug 27 '24 17:08 joshunrau

Thanks @joshunrau. I'm not opposed to making the switch; my only concern is that there is 10 years worth of content (docs, recorded talks, etc.) that uses snake case for timeline/trial parameters. Since many researchers get introduced to JS programming through this library, the disconnect between existing docs might be especially confusing. But, if everything is aliased and there's deprecation warnings it seems like the trade off is probably worth it.

@jspsych/core any thoughts?

I think if there are no objections, then a PR would be very helpful.

jodeleeuw avatar Aug 28 '24 00:08 jodeleeuw

Awesome! I am hoping to make a lot of contributions to this project since I think it could be really nicely integrated into what we are doing (Open Data Capture).

joshunrau avatar Aug 29 '24 16:08 joshunrau