Skip to content

Commit 95e2ffa

Browse files
committed
chore: update docs and automation
1 parent 96901c0 commit 95e2ffa

16 files changed

+361
-30
lines changed

Diff for: .github/ISSUE_TEMPLATE.md

-9
This file was deleted.

Diff for: .github/ISSUE_TEMPLATE/bug-report.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: "Bug report"
3+
about: A feature is not working as expected.
4+
---
5+
6+
## New Bug Report
7+
8+
### Checklist
9+
10+
<!--
11+
Check every following box [x] before submitting your issue.
12+
Click the "Preview" tab for better readability.
13+
Thanks for contributing to Moralis!
14+
-->
15+
16+
- [ ] I am not disclosing a [vulnerability](https://github.com/MoralisWeb3/react-moralis/blob/main/SECURITY.md).
17+
- [ ] I have searched through [existing issues](https://github.com/MoralisWeb3/react-moralis/issues?q=is%3Aissue) and the [Moralis Forum](https://forum.moralis.io/).
18+
- [ ] I can reproduce the issue with the [latest react-moralis release](https://github.com/MoralisWeb3/react-moralis/releases), [latest SDK release](https://github.com/MoralisWeb3/Moralis-JS-SDK/releases), and my server is updated to the latest version.<!-- We don't investigate issues for outdated releases. -->
19+
20+
### Issue Description
21+
22+
<!-- What is the specific issue? -->
23+
24+
### Steps + code to reproduce
25+
26+
<!-- How can someone else reproduce the issue? -->
27+
28+
### Actual Outcome
29+
30+
<!-- What outcome, for example query result, did you get? -->
31+
32+
### Expected Outcome
33+
34+
<!-- What outcome, for example query result, did you expect? -->
35+
36+
### Environment
37+
38+
<!-- Be specific with versions, don't use "latest" or semver ranges like "~x.y.z" or "^x.y.z". -->
39+
40+
Server
41+
42+
- Moralis server version: `FILL_THIS_OUT`
43+
44+
Client
45+
46+
- react-moralis version: `FILL_THIS_OUT`
47+
- Moralis SDK version: `FILL_THIS_OUT`
48+
- Operating system: `FILL_THIS_OUT`
49+
- Browser: `FILL_THIS_OUT`
50+
51+
### Logs
52+
53+
<!-- Include relevant logs here -->

Diff for: .github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Getting help
4+
url: https://forum.moralis.io/
5+
about: Get help with any questions on our Moralis Forum

Diff for: .github/ISSUE_TEMPLATE/feature-request.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: "Feature request"
3+
about: Suggest new functionality or an enhancement of existing functionality.
4+
---
5+
6+
## New Feature Request
7+
8+
### Checklist
9+
10+
<!--
11+
Check every following box [x] before submitting your issue.
12+
Click the "Preview" tab for better readability.
13+
Thanks for contributing to Moralis!
14+
-->
15+
16+
- [ ] I am not disclosing a [vulnerability](https://github.com/MoralisWeb3/react-moralis/blob/main/SECURITY.md).
17+
- [ ] I have searched through [existing issues](https://github.com/MoralisWeb3/react-moralis/issues?q=is%3Aissue) and the [Moralis Forum](https://forum.moralis.io/).
18+
19+
### Current Limitation
20+
21+
<!-- Which current limitation is the feature or enhancement addressing? -->
22+
23+
### Feature / Enhancement Description
24+
25+
<!-- What is the concept of the functionality and how should it be implemented? -->
26+
27+
### Example Use Case
28+
29+
<!-- What is an example use case in steps (1. / 2. / 3. / etc.) that describes the functionality? -->
30+
31+
### Alternatives / Workarounds
32+
33+
<!-- Which alternatives or workarounds exist currently? -->
34+
35+
### 3rd Party References
36+
37+
<!-- Have you seen a similar functionality provided somewhere else? -->

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+26-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1-
- **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
1+
---
2+
name: "Pull request"
3+
about: A new pull request
4+
---
25

3-
- **What is the current behavior?** (You can also link to an open issue here)
6+
## New Pull Request
47

5-
- **What is the new behavior (if this is a feature change)?**
8+
### Checklist
69

7-
- **Other information**:
10+
<!--
11+
Check every following box [x] before submitting your PR.
12+
Click the "Preview" tab for better readability.
13+
Thanks for contributing to Moralis!
14+
-->
15+
16+
- [ ] I am not disclosing a [vulnerability](https://github.com/MoralisWeb3/react-moralis/blob/main/SECURITY.md).
17+
- [ ] My code is conform the [code style](https://github.com/MoralisWeb3/react-moralis/blob/main/CODE_STYLE.md)
18+
- [ ] I have made corresponding changes to the documentation
19+
- [ ] I have updated Typescript definitions when needed
20+
21+
### Issue Description
22+
23+
<!-- Add a brief description of the issue this PR solves. -->
24+
25+
Related issue: #`FILL_THIS_OUT`
26+
27+
### Solution Description
28+
29+
<!-- Add a description of the solution in this PR. -->

Diff for: .github/dependabot.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: 'npm'
5+
# Look for `package.json` and `lock` files in the `root` directory
6+
directory: '/'
7+
# Check the npm registry for updates every day (weekdays)
8+
schedule:
9+
interval: 'daily'

Diff for: .github/workflows/codeql-analysis.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: 'CodeQL'
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [main]
9+
schedule:
10+
- cron: '15 19 * * 1'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: ['javascript']
25+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
26+
# Learn more:
27+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v2
32+
33+
# Initializes the CodeQL tools for scanning.
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v1
36+
with:
37+
languages: ${{ matrix.language }}
38+
# If you wish to specify custom queries, you can do so here or in a config file.
39+
# By default, queries listed here will override any specified in a config file.
40+
# Prefix the list here with "+" to use these queries and those in the config file.
41+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
42+
43+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
44+
# If this step fails, then you should remove it and run the build manually (see below)
45+
- name: Autobuild
46+
uses: github/codeql-action/autobuild@v1
47+
48+
# ℹ️ Command-line programs to run using the OS shell.
49+
# 📚 https://git.io/JvXDl
50+
51+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
52+
# and modify them (or add more) to build your code if your project
53+
# uses a compiled language
54+
55+
#- run: |
56+
# make bootstrap
57+
# make release
58+
59+
- name: Perform CodeQL Analysis
60+
uses: github/codeql-action/analyze@v1

Diff for: .github/workflows/main.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint and format
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
test:
11+
name: Lint and format
12+
runs-on: ${{matrix.os}}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
node: [14]
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Install packages
20+
run: npm ci
21+
- name: ESLint
22+
run: npm run lint
23+
- name: Prettier
24+
run: npm run format:check

Diff for: .husky/commit-msg renamed to .husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn commitlint --edit $1
4+
npm run pre-commit

Diff for: .huskyrc

-5
This file was deleted.

Diff for: CODE_OF_CONDUCT.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

Diff for: CODING_STYLE.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Coding Style
2+
3+
- Most importantly, match the existing code style as much as possible.
4+
- Follow the ESlint rules for code-styling and Prettier rules for formatting

Diff for: CONTRIBUTING.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing to react-moralis
2+
3+
## Setting up the project for debugging and contributing
4+
5+
### Setting up you local machine:
6+
7+
- [Fork](https://github.com/MoralisWeb3/react-moralis) this project and clone the fork on your local machine:
8+
9+
```sh
10+
git clone https://github.com/MoralisWeb3/react-moralis.git
11+
cd react-moralis # go into the clone directory
12+
npm install # install all the node dependencies
13+
```
14+
15+
Make sure to have a ESlint and Prettier plugin installed to check for code-smells and auto-formatting.
16+
17+
### Building the repo
18+
19+
When developing react-moralis you can use `yarn build:watch` in order to rebuild your changes upon each save.
20+
21+
### Pull Requests
22+
23+
1. Fork the repo and create your branch from `main`.
24+
2. If you've changed APIs, update the documentation.
25+
3. Make sure your code lints and is correctly formatted.
26+
27+
### Known Issues
28+
29+
We use GitHub issues to track public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new issue, try to make sure your problem doesn't already exist.
30+
31+
### Coding Style
32+
33+
Please follow the [Coding Style](https://github.com/MoralisWeb3/react-moralis/blob/main/CODING_STYLE.md).
34+
35+
### Code of Conduct
36+
37+
This project adheres to the [Contributor Covenant Code of Conduct](https://github.com/MoralisWeb3/react-moralis/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to honor this code.
38+
39+
## License
40+
41+
By contributing to react-moralis, you agree that your contributions will be licensed under its license.

Diff for: SECURITY.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Moralis Responsible Disclosure Policy
2+
3+
If you have found a security vulnerability in any of the systems provided by Moralis we encourage you to report it to us ASAP.
4+
We will investigate all legitimate reports and do our best to quickly fix the problem.
5+
6+
Before making a report, please review this page to understand our disclosure policy and how to communicate with us.
7+
8+
# Responsible Disclosure Policy
9+
10+
If you comply with the policies below when reporting a security issue to Moralis, we will not initiate a lawsuit or law enforcement investigation against you in response to your report.
11+
12+
We ask that:
13+
14+
- You give us reasonable time to investigate and mitigate an issue you report before making public any information about the report or sharing such information with others. This means we request _at least_ **7 days** to get back to you with an initial response and _at least_ **30 days** from initial contact (made by you) to apply a patch.
15+
- You do not interact with an individual account (which includes modifying or accessing data from the account) if the account owner has not consented to such actions.
16+
- You make a good faith effort to avoid privacy violations and disruptions to others, including (but not limited to) destruction of data and interruption or degradation of our services.
17+
18+
# Communicating with us
19+
20+
All vulnerabilities should be privately reported to us by going to [Moralis Vulnerability Disclosure Program](https://app.intigriti.com/programs/moralis/moralisio/detail).

Diff for: package.json

+13-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
"dotenv": "^8.2.0",
5151
"eslint": "^7.24.0",
5252
"eslint-plugin-react": "^7.23.2",
53-
"husky": "^6.0.0",
53+
"husky": "^7.0.2",
54+
"lint-staged": "^11.2.3",
5455
"moralis": "latest",
5556
"prettier": "^2.2.1",
5657
"rollup": "^2.45.1",
@@ -79,7 +80,17 @@
7980
"release:alpha": "standard-version --prerelease alpha --no-verify",
8081
"release:minor": "standard-version --release-as minor --no-verify",
8182
"release:patch": "standard-version --release-as patch --no-verify",
82-
"release:major": "standard-version --release-as major --no-verify"
83+
"release:major": "standard-version --release-as major --no-verify",
84+
"prepare": "husky install",
85+
"pre-commit": "lint-staged"
86+
},
87+
"lint-staged": {
88+
"*.js": [
89+
"eslint"
90+
],
91+
"*.{js,ts,html,css,md,json}": [
92+
"prettier --write"
93+
]
8394
},
8495
"dependencies": {
8596
"fast-deep-equal": "^3.1.3",

0 commit comments

Comments
 (0)