generated from defi-wonderland/ts-turborepo-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e4548cc
Showing
60 changed files
with
6,604 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "tsconfig.json", | ||
tsconfigRootDir: __dirname, | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint/eslint-plugin"], | ||
extends: ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: [".eslintrc.cjs"], | ||
rules: { | ||
"@typescript-eslint/explicit-function-return-type": "error", | ||
"@typescript-eslint/explicit-module-boundary-types": "error", | ||
"@typescript-eslint/no-misused-promises": "error", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/no-unsafe-assignment": "warn", | ||
"@typescript-eslint/no-unsafe-argument": "warn", | ||
"@typescript-eslint/no-unsafe-member-access": "error", | ||
"@typescript-eslint/no-unsafe-return": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ argsIgnorePattern: "_+", ignoreRestSiblings: true }, | ||
], | ||
"@typescript-eslint/prefer-as-const": "warn", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Setup environment" | ||
description: "Prepare repository and all dependencies" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Use pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
run_install: false | ||
|
||
- name: Use Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
|
||
- name: Use foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# 🤖 Linear | ||
|
||
Closes lin-XXX | ||
|
||
## Description | ||
|
||
|
||
## Checklist before requesting a review | ||
|
||
- [ ] I have conducted a self-review of my code. | ||
- [ ] I have conducted a QA. | ||
- [ ] If it is a core feature, I have included comprehensive tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
name: Run Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out github repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup environment | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run Build | ||
run: pnpm build | ||
|
||
- name: Check types | ||
run: pnpm check-types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Lint | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
commitlint: | ||
name: Lint Commit Messages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v5 | ||
with: | ||
commitDepth: 1 | ||
|
||
lint: | ||
name: Run Linters | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run Prettier | ||
run: pnpm format | ||
|
||
- name: Run Linter | ||
run: pnpm lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Main Workflow | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: | ||
- dev | ||
- main | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
|
||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
needs: build | ||
|
||
test: | ||
uses: ./.github/workflows/test.yml | ||
needs: lint | ||
|
||
test-integration: | ||
uses: ./.github/workflows/test-integration.yml | ||
needs: lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
unit: | ||
name: Integration tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out github repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup environment | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run integration tests | ||
run: pnpm test:integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
unit: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out github repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup environment | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run tests with coverage | ||
run: pnpm test:cov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# See https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored for more about ignoring yarn files. | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
*.tsbuildinfo | ||
|
||
# Dependencies | ||
node_modules | ||
|
||
# Local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Build Outputs | ||
out/ | ||
build | ||
dist | ||
cache | ||
|
||
# Debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Misc | ||
.DS_Store | ||
*.pem | ||
|
||
coverage | ||
|
||
# Turbo | ||
.turbo | ||
|
||
# Foundry | ||
contracts/out | ||
contracts/cache | ||
|
||
# Temporary files | ||
.tmp | ||
|
||
# IDEA | ||
.idea | ||
|
||
# vscode | ||
.vscode | ||
|
||
# Coverage | ||
lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx --no-install commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm lint-staged && pnpm check-types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
save-exact=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"arrowParens": "always", | ||
"printWidth": 100, | ||
"singleQuote": false, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"tabWidth": 4, | ||
"plugins": ["@ianvs/prettier-plugin-sort-imports"], | ||
"importOrder": [ | ||
"<TYPES>", | ||
"<THIRD_PARTY_MODULES>", | ||
"", | ||
"<TYPES>^[.|..|~]", | ||
"^~/", | ||
"^[../]", | ||
"^[./]" | ||
], | ||
"importOrderParserPlugins": ["typescript", "decorators-legacy"], | ||
"importOrderTypeScriptVersion": "5.4.5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Wonderland | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.