DEV Community


Discussion on: snake_case, camelCase, or dash-case?

khrome83 profile image
Zane Milakovic

I don’t have a dog in the fight, except this.

I always try to program in the conventions of the language I am using.

Dashes for CSS classes. CamelCase for JS, except title case for classes. Python is underscores. Ruby is just a mixed bag. Dashes for html attributes.

To me that makes readable code. And I think the conventions are better for the community. Historically when these things change, it’s something that gets adopted and accepted. In recent years for JavaScript this seems to be AirBnB or Prettier.