This post is a fantastic breakdown of naming things in front-end code. Many of the specifics he outlines are things we adhere to in our own work, but ultimately any one of these conventions can be handled differently. With that in mind, these are probably the most important lines in the whole post:
That’s the spirit behind my front-end guidelines questionnaire. When we create design systems with our clients, we make sure that every developer is writing code to the same standards, and spend a lot of time in the first few weeks of a project to ensure everyone is on the same page. It’s so incredibly helpful to sweat the details like this as it saves everyone from having to clean up a giant mess down the line.