Skip to content

Commit

Permalink
Merge pull request #3 from semaphore-protocol/feat/projects-configs
Browse files Browse the repository at this point in the history
Add projects and configs
  • Loading branch information
vplasencia authored Apr 18, 2024
2 parents ae86d35 + 846aa90 commit 9dc5372
Show file tree
Hide file tree
Showing 56 changed files with 13,184 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const fs = require("node:fs")
const path = require("node:path")

const packages = fs.readdirSync(path.resolve(__dirname, "packages"))
const apps = fs.readdirSync(path.resolve(__dirname, "apps"))

module.exports = {
extends: ["@commitlint/config-conventional"],
prompt: {
scopes: [...packages, ...apps],
markBreakingChangeMode: true,
allowCustomIssuePrefix: false,
allowEmptyIssuePrefix: false,
issuePrefixes: [
{
value: "re",
name: "re: ISSUES related"
}
]
}
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
indent_size = 4

[*.md]
trim_trailing_whitespace = false
23 changes: 23 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# dependencies
node_modules
package-lock.json
yarn.lock
.yarn

# testing
coverage
coverage.json

# production
dist
build
/docs

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
30 changes: 30 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"root": true,
"env": {
"es6": true
},
"extends": ["airbnb", "airbnb-typescript/base", "plugin:jest/recommended", "plugin:jest/style", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": ["./tsconfig.json", "./packages/**/tsconfig.json"]
},
"plugins": ["@typescript-eslint", "jest"],
"rules": {
"react/require-default-props": "off",
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"import/prefer-default-export": "off",
"import/extensions": "off",
"no-underscore-dangle": "off",
"import/no-extraneous-dependencies": "off",
"no-bitwise": "off",
"no-await-in-loop": "off",
"no-restricted-syntax": "off",
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
"@typescript-eslint/lines-between-class-members": "off",
"no-param-reassign": "off"
}
}
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: "\U0001F41E Bug"
about: Create a report to help us improve
title: ''
labels: "bug \U0001F41B"
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Technologies (please complete the following information):**

- Node.js version
- NPM version

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/---feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U0001F680 Feature"
about: Suggest an idea for ZK-Kit
title: ''
labels: 'feature :rocket:'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/---package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "\U0001F4E6 Package"
about: Propose a new ZK-kit package
title: ''
labels: 'feature :rocket:'
assignees: ''

---

**Describe the package you'd like**
A clear and concise description of the type of package you have in mind.

**Additional context**
Add any other context about the package here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/♻️-refactoring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "♻️ Refactoring"
about: Suggest any improvements for this project
title: ''
labels: 'refactoring :recycle:'
assignees: ''

---

**Describe the improvement you're thinking about**
A clear and concise description of what you think could improve the code.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions you've considered.

**Additional context**
Add any other context or screenshots about the improvement request here.
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!-- Please refer to our CONTRIBUTING documentation for any questions on submitting a pull request. -->
<!-- Provide a general summary of your changes in the Title above. -->

## Description

<!-- Describe your changes in detail. -->
<!-- You may want to answer some of the following questions: -->
<!-- What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) -->
<!-- What is the current behavior?** (You can also link to an open issue here) -->
<!-- What is the new behavior (if this is a feature change)? -->
<!-- Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?) -->

## Related Issue(s)

<!-- This project accepts pull requests related to open issues. -->
<!-- If suggesting a new feature or change, please discuss it in an issue first. -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce. -->
<!-- Please link to the issue(s) here -->

<!-- Closes # -->
<!-- Fixes # -->

## Other information

<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
<!-- Feel free to remove this section if you will not use it. -->

## Checklist

<!-- Please check if the PR fulfills these requirements. -->

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have run `yarn style` without getting any errors
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
35 changes: 35 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: docs

on:
push:
branches:
- main

jobs:
gh-pages:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn

- name: Build libraries
run: yarn build:libraries

- name: Generate doc website
run: yarn docs

- name: Publish on Github Pages
uses: crazy-max/[email protected]
with:
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67 changes: 67 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: production

on:
push:
branches:
- main

jobs:
style:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn

- name: Build libraries
run: yarn build:libraries

- name: Lint | Format
run: yarn style

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn

- name: Build libraries
run: yarn build:libraries

- name: Test libraries
run: yarn test:libraries

- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-libraries
parallel: true

coverage:
runs-on: ubuntu-latest
needs: test

steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
47 changes: 47 additions & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: pull-requests

on:
pull_request:

jobs:
style:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn

- name: Build libraries
run: yarn build:libraries

- name: Lint | Format
run: yarn style

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn

- name: Build libraries
run: yarn build:libraries

- name: Test libraries
run: yarn test
Loading

0 comments on commit 9dc5372

Please sign in to comment.