You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/contribution-guidelines.mdx
+104
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,110 @@ Now, from the [project list](), fork a project that you want to contribute to!
47
47
48
48
## Conventions
49
49
50
+
### Conventional commits
51
+
52
+
Conventional Commits is a specification for writing standardized and semantic commit messages in Git. It provides a set of rules for creating commit messages in a consistent and meaningful way. The goal is to make it easier to understand the history of a project, automate versioning, and generate release notes.
Describes the module, component, or area of the project related to the commit.
61
+
Example: auth, frontend, backend, etc.
62
+
-**Message (required):**
63
+
Provides a concise and clear description of the changes made in the commit.
64
+
65
+
#### Types of commits
66
+
67
+
-**feat:** A new feature for the user or the application.
68
+
69
+
-**fix:** A bug fix for the user or the application.
70
+
71
+
-**chore:** Routine tasks, maintenance, or housekeeping changes that are not related to user-facing features or bug fixes.
72
+
73
+
-**docs:** Changes to the documentation.
74
+
75
+
-**style:** Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.).
76
+
77
+
-**refactor:** Code refactoring without any functional changes.
78
+
79
+
-**test:** Adding or modifying tests.
80
+
81
+
-**build:** Changes that affect the build system or external dependencies.
82
+
83
+
-**ci:** Changes to the continuous integration configuration and scripts.
84
+
85
+
-**perf:** Performance improvements.
86
+
87
+
#### Examples
88
+
89
+
- feat(auth): add user authentication
90
+
- fix(frontend): resolve issue with responsive layout
91
+
- chore(docs): update installation instructions
92
+
93
+
### Linting and Formatting
94
+
95
+
Linting and formatting are essential practices in software development that help maintain code quality, consistency, and readability. These processes are often automated using specific tools to enforce coding standards and catch potential issues early in the development cycle.
96
+
97
+
#### Linting
98
+
99
+
Linting involves analyzing code for potential errors, bugs, or stylistic issues. Linters are tools that statically analyze source code to identify and flag patterns that might lead to runtime errors or are against coding conventions. Linters provide developers with feedback on their code, helping them adhere to best practices and maintain a consistent codebase.
100
+
101
+
##### Examples:
102
+
103
+
-**ESLint:** A popular JavaScript and TypeScript linter that helps identify and fix issues related to code quality and style.
104
+
105
+
```bash
106
+
# Install ESLint
107
+
npm install eslint --save-dev
108
+
109
+
# Run ESLint
110
+
npx eslint yourFile.js
111
+
```
112
+
-**flake8:** A linting tool for Python that checks for PEP 8 style guide violations and other code quality issues.
113
+
114
+
```bash
115
+
# Install flake8
116
+
pip install flake8
117
+
118
+
# Run flake8
119
+
flake8 your_file.py
120
+
```
121
+
#### Formatting
122
+
Code formatting focuses on the appearance of the code, ensuring a consistent style throughout a codebase. Automated code formatters apply predefined rules to format the code, making it visually consistent and reducing debates about coding styles within a team. This helps maintain a clean and readable codebase.
123
+
124
+
#### Examples:
125
+
-**Black:** A Python code formatter that reformats code in a consistent style, emphasizing a "blackened" style.
126
+
127
+
```bash
128
+
# Install Black
129
+
pip install black
130
+
131
+
# Run Black
132
+
black your_file.py
133
+
```
134
+
135
+
-**Prettier:** A JavaScript/TypeScript code formatter that ensures consistent code style across the project.
136
+
137
+
```bash
138
+
# Install Prettier
139
+
npm install --save-dev prettier
140
+
141
+
# Run Prettier
142
+
npx prettier --write yourFile.js
143
+
```
144
+
145
+
-**gofmt:** The official Go language formatter that automatically formats Go source code.
146
+
147
+
```bash
148
+
# Run gofmt
149
+
gofmt -w your_file.go
150
+
```
151
+
152
+
Both linting and formatting play crucial roles in maintaining code quality and consistency, contributing to better collaboration and overall project maintainability.
0 commit comments