Skip to content

Commit 8c64f99

Browse files
committed
Officially switching to ES Module system.
1 parent cb6201f commit 8c64f99

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ should add unique value.
6161
* **Example:**`UserProfile.js` is allowed but `userprofile.js`,`Userprofile.js`,`user-Profile.js`,`userProfile.js` are
6262
not.
6363

64+
#### Module System
65+
66+
We use the [ES Module](https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/) system, which bring an official, standardized module system to JavaScript.
67+
68+
It roughly means you will need to use `export` and `import` statements instead of `module.exports` and `require()`.
69+
6470
#### Testing
6571

6672
Be confident that your code works. When was the last time you committed a code change, your build failed, and half of
@@ -125,7 +131,7 @@ function sumOfArray (arrayOfNumbers) {
125131
return (sum)
126132
}
127133
```
128-
*
134+
*
129135
* Avoid using global variables and avoid `==`
130136
* Please use `let` over `var`
131137
* Please refrain from using `console.log` or any other console methods
File renamed without changes.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "javascript",
33
"version": "1.0.0",
4+
"type": "module",
45
"description": "A repository for All algorithms implemented in Javascript (for educational purposes only)",
56
"main": "",
67
"scripts": {

0 commit comments

Comments
 (0)