Skip to content

Commit 7f479b8

Browse files
authored
merge: consistent list syntax in CONTRIBUTING.md (#921)
* feat: add style and run scripts on pre-commit hooks * Update package-lock.json * Update CONTRIBUTING.md * Add period at the end of lines
1 parent da6c227 commit 7f479b8

File tree

1 file changed

+34
-31
lines changed

1 file changed

+34
-31
lines changed

CONTRIBUTING.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ make sure that you **read the whole guidelines**. If you have any doubt on the c
1313
We are very happy that you consider implementing algorithms and data structures for others! This repository is
1414
referenced and used by learners from around the globe. Being one of our contributors, you agree and confirm that:
1515

16-
* You did your work - plagiarism is not allowed.
17-
* Any plagiarized work will not be merged.
18-
* Your work will be distributed under [GNU License](LICENSE) once your pull request is merged.
19-
* Your submitted work must fulfill our styles and standards.
16+
- You did your work - plagiarism is not allowed.
17+
- Any plagiarized work will not be merged.
18+
- Your work will be distributed under [GNU License](LICENSE) once your pull request is merged.
19+
- Your submitted work must fulfill our styles and standards.
2020

2121
**New implementation** is welcome! For example, new solutions to a problem, different representations of a graph data
2222
structure or algorithm designs with different complexity.
@@ -35,19 +35,19 @@ If you submit a pull request that resolves an open issue, please help us to keep
3535

3636
An Algorithm is one or more functions (or classes) that:
3737

38-
* take one or more inputs,
39-
* perform some internal calculations or data manipulations,
40-
* return one or more outputs,
41-
* have minimal side effects.
38+
- take one or more inputs.
39+
- perform some internal calculations or data manipulations.
40+
- return one or more outputs.
41+
- have minimal side effects.
4242

4343
Algorithms should be packaged in a way that would make it easy for readers to put them into larger programs.
4444

4545
Algorithms should:
4646

47-
* have intuitive class and function names that make their purpose clear to readers
48-
* use JavaScript naming conventions and intuitive variable names to ease comprehension
49-
* be flexible to take different input values
50-
* raise JavaScript exceptions (RangeError, etc.) on erroneous input values
47+
- have intuitive class and function names that make their purpose clear to readers.
48+
- use JavaScript naming conventions and intuitive variable names to ease comprehension.
49+
- be flexible to take different input values.
50+
- raise JavaScript exceptions (RangeError, etc.) on erroneous input values.
5151

5252
Algorithms in this repo should not be how-to examples for existing JavaScript packages. Instead, they should perform
5353
internal calculations or manipulations to convert input values into different output values. Those calculations or
@@ -56,9 +56,9 @@ should add unique value.
5656

5757
#### File Naming Convention
5858

59-
* filenames should use the UpperCamelCase (PascalCase) style.
60-
* There should be no spaces in filenames.
61-
* **Example:**`UserProfile.js` is allowed but `userprofile.js`,`Userprofile.js`,`user-Profile.js`,`userProfile.js` are
59+
- filenames should use the UpperCamelCase (PascalCase) style.
60+
- There should be no spaces in filenames.
61+
- **Example:** `UserProfile.js` is allowed but `userprofile.js`,`Userprofile.js`,`user-Profile.js`,`userProfile.js` are
6262
not.
6363

6464
#### Module System
@@ -114,32 +114,35 @@ Before committing, please run
114114
npm run style
115115
```
116116

117-
in order to apply the coding style (where it can be done automatically). If an error is shown, please figure out what's
117+
In order to apply the coding style (where it can be done automatically). If an error is shown, please figure out what's
118118
wrong, fix it and run standard again.
119119

120120
A few (but not all) of the things to keep in mind:
121121

122-
* Use camelCase with the leading character as lowercase for identifier names (variables and functions)
123-
* Names start with a letter
124-
* Follow code indentation: Always use 2 spaces for indentation of code blocks
122+
- Use camelCase with the leading character as lowercase for identifier names (variables and functions).
123+
- Names start with a letter.
124+
- Follow code indentation: Always use 2 spaces for indentation of code blocks.
125+
125126
```js
126-
function sumOfArray (arrayOfNumbers) {
127+
function sumOfArray(arrayOfNumbers) {
127128
let sum = 0
129+
128130
for (let i = 0; i < arrayOfNumbers.length; i++) {
129131
sum += arrayOfNumbers[i]
130132
}
131-
return (sum)
133+
134+
return sum
132135
}
133136
```
134-
*
135-
* Avoid using global variables and avoid `==`
136-
* Please use `let` over `var`
137-
* Please refrain from using `console.log` or any other console methods
138-
* **Absolutely** don't use `alert`
139-
* We strongly recommend the use of ECMAScript 6
140-
* Avoid importing external libraries for basic algorithms. Only use those libraries for complicated algorithms
141-
* Most importantly:
142-
* **Be consistent in the use of these guidelines when submitting**
143-
* Happy coding!
137+
138+
- Avoid using global variables and avoid `==`.
139+
- Please use `let` over `var`.
140+
- Please refrain from using `console.log` or any other console methods.
141+
- **Absolutely** don't use `alert`.
142+
- We strongly recommend the use of ECMAScript 6.
143+
- Avoid importing external libraries for basic algorithms. Only use those libraries for complicated algorithms.
144+
- Most importantly:
145+
- **Be consistent in the use of these guidelines when submitting.**
146+
- Happy coding!
144147

145148
Writer [@itsvinayak](https://github.com/itsvinayak), May 2020.

0 commit comments

Comments
 (0)