Skip to content

Commit eb07f85

Browse files
authored
Update CODE_STYLE.md
1 parent 08b0f91 commit eb07f85

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

CODE_STYLE.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,29 @@ This document outlines the code style guidelines for the Comty project. The goal
1515

1616
## Language-specific Guidelines
1717
### JavaScript
18-
- Use ES6 syntax and features whenever possible.
1918

19+
#### Do's
20+
- Use ES6 syntax and features whenever possible.
2021
- Use double quotes for strings, including for JSX.
21-
2222
- Use const and let instead of var.
23-
2423
- Always use strict equality (=== and !==) for comparisons.
24+
- Use a CSS preprocessor like LESS. (We recommend use LESS cause it's used in the project, we prefer to no include another dependency)
25+
- Use the :hover, :focus, and :active pseudo-classes as needed.
26+
- Use descriptive class and ID names that clearly indicate their purpose.
27+
- Use a consistent naming convention for classes and IDs, and avoid using inline styles.
2528

29+
#### Dont's
30+
- Don't include unnecesary logs over the console.
31+
- Don't declare unnecesary variables.
2632
- Avoid using eval() and with().
2733

34+
#### Format
35+
- Use 2 tabs for indentation.
36+
- Use kebab-case for ID names.
2837
- Use camelCase for variable and function names.
29-
3038
- Use PascalCase for class and component names.
3139

32-
- Use four spaces for indentation.
33-
34-
- Use a CSS preprocessor like LESS to organize styles. (We recommend use LESS cause it's used in the project, we prefer to no include another dependency)
35-
36-
- Use kebab-case for ID names.
37-
38-
- Use a consistent naming convention for classes and IDs, and avoid using inline styles.
39-
40-
- Use the :hover, :focus, and :active pseudo-classes as needed.
41-
42-
- Use descriptive class and ID names that clearly indicate their purpose.
40+
Preferably use prettier to format all the code, the configuration file is included in the repository.
4341

4442
## Conclusion
45-
By following these code style guidelines, we can create code that is easy to read, understand, and maintain. These guidelines are not exhaustive, and there may be cases where they don't apply or conflict with other guidelines. In such cases, use your best judgement and work with the team to come to a consensus.
43+
By following these code style guidelines, we can create code that is easy to read, understand, and maintain. These guidelines are not exhaustive, and there may be cases where they don't apply or conflict with other guidelines. In such cases, use your best judgement and work with the team to come to a consensus.

0 commit comments

Comments
 (0)