Skip to content

Fix some typos in CONTRIBUTING.md #628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ Algorithms in this repo should not be how-to examples for existing JavaScript pa

#### File Naming Convention
- filenames should use the UpperCamelCase (PascalCase) style.
- There should be no spaces in filenames.
- There should be no spaces in filenames.
**Example:**`UserProfile.js` is allowed but `userprofile.js`,`Userprofile.js`,`user-Profile.js`,`userProfile.js` are not

#### Testing

Be confident that your code works. When was the last time you committed a code change, your build failed, and half of your app stopped working? Mine was last week. Writing tests for our Algorithms will help us ensure the implementations are air tight even after multiple fixes and code changes.
We use a NPM package [doctest](https://www.npmjs.com/package/doctest) to add basic testing functionality to our code. Doctests are simple structured comments that evaluate an function and ensure a required result.
Be confident that your code works. When was the last time you committed a code change, your build failed, and half of your app stopped working? Mine was last week. Writing tests for our Algorithms will help us ensure the implementations are air tight even after multiple fixes and code changes.
We use a NPM package [doctest](https://www.npmjs.com/package/doctest) to add basic testing functionality to our code. Doctests are simple structured comments that evaluate a function and ensure a required result.

The implementation of doctest is quite simple. You can easily learn it [here](https://www.npmjs.com/package/doctest).

Expand All @@ -76,23 +76,23 @@ To maximize the readability and correctness of our code, we require that new sub
$ standard MyFile.js // if that fails, try: npx standard MyFile.js
```

- Use camelCase for with leading character lowercase for identifier names (variables and functions)
- Use camelCase with the leading character as lowercase for identifier names (variables and functions)
- Names start with a letter
- follow code indentation
- Always use 2 spaces for indentation of code blocks
```
function sumOfArray (arrayOfNumbers) {
let sum = 0
for (let i = 0; i < arrayOfNumbers.length; i++) {
sum += arrayOfNumbers[i]
}
return (sum)
let sum = 0
for (let i = 0; i < arrayOfNumbers.length; i++) {
sum += arrayOfNumbers[i]
}
return (sum)
}

```
- Avoid using global variables and avoid '=='
- Please use 'let' over 'var'
- Please use 'console.log()'
- Please use 'console.log()'
- We strongly recommend the use of ECMAScript 6
- Avoid importing external libraries for basic algorithms. Only use those libraries for complicated algorithms.
- Most importantly,
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy