-
Notifications
You must be signed in to change notification settings - Fork 46
/
CONTRIBUTING
65 lines (39 loc) · 1.97 KB
/
CONTRIBUTING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Contributing
Thank you for your interest in contributing to the Superfluid examples repository!
Before getting started, be sure to review the [code of conduct](./code-of-conduct.md).
## Editing an Existing Project
To edit an existing project, follow the directions to get started under the [README](./README.md).
## Creating a New Example
To create a new example, start by opening an issue on this GitHub repository using the "New Example"
template and follow its instructions.
## Style Guidelines
### Linting
ESLint is used for linting and will prevent commits if the code does not conform to the standard.
### Project Layout
Each project should follow a similar pattern. Example projects should exist within the `./examples`
directory.
Inside of each project, the following is required.
1. `README.md` file documenting its functionality and use.
2. `package.json` with all local dependencies.
3. `build-and-test.sh` with execute permission for the workflows.
4. `hardhat.config.js` with the local configuration. When using Foundry, and exception may be made.
5. `.env.template` if the project requires environment variables.
### Testing
While 100% test coverage is not required, it is highly recommended to get as close as possible.
### Typescript
If the project uses Typescript, be sure to extend the base tsconfig files in
[this directory](./config).
### Comments
Natspec comments should always use three slashes `///` instead of the star pattern `/** */`.
Natspec should be on every external function, modifier, public variable, event, and error. All
parameters and return values should be documented.
General comments should always use two slashes `//`.
Comments that indicate a "section" of the code should use `// ---` where the dashes continue to the
100th character in the line.
Example:
```
// -------------------------------------------------------------------------------------------------
// SECTION NAME
...
```
Javascript files do not have to conform to this comment standard.