ContactEngineering / ce-ui

User interface of contact.engineering
https://contact.engineering
MIT License
0 stars 0 forks source link

Deciding on Python and JavaScript coding convention #6

Open jotelha opened 1 year ago

jotelha commented 1 year ago

We should find some proper coding convention for JavaScript

pastewka commented 9 months ago

One obvious decision to make is snake_case vs camelCase. While most JS code is camelCase, most Python code is snake_case. Also dictionaries that come of serializers are snake case, and those dictionary leak into the JS side of the code.

Bokeh also uses snake_case for JS code, probably because of the close coupling to Python.

My suggestion would be to stick to snake case for all our code, including JS. This will make JS code look awkward at times, as external dependencies are likely camelCase.

pastewka commented 5 months ago

We use PEP-8 for Python code now