-
Notifications
You must be signed in to change notification settings - Fork 6
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 96f6078
Showing
132 changed files
with
20,527 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,25 @@ | ||
{ | ||
// Root leverages the cascading feature of ESLint. | ||
// Children can still overrides settings. | ||
// https://eslint.org/docs/latest/user-guide/configuring/configuration-files#cascading-and-hierarchy | ||
"root": true, | ||
|
||
// Common config shared accross all children projects. | ||
"parser": "@typescript-eslint/parser", | ||
"extends": ["plugin:prettier/recommended"], | ||
"plugins": ["@typescript-eslint", "unused-imports", "address"], | ||
"rules": { | ||
"no-console": "error", | ||
"unused-imports/no-unused-imports": "error", | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"vars": "all", | ||
"args": "after-used", | ||
"ignoreRestSiblings": true | ||
} | ||
], | ||
"address/addr-type": ["error", "checksum"] | ||
}, | ||
"ignorePatterns": ["out", ".next", "dist", "cache", "lib", "storybook-*"] | ||
} |
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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: ci-code-style | ||
|
||
on: | ||
push: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
code-style: | ||
name: Check code styling | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Setup Node CI | ||
uses: ./.github/actions/setup-node | ||
|
||
- name: Lint code | ||
run: yarn 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,38 @@ | ||
name: ci-packages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- "packages/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
jest: | ||
name: Build and test packages | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
package: | ||
- "@morpho-org/morpho-ts" | ||
- "@morpho-org/morpho-test" | ||
- "@morpho-org/blue-sdk" | ||
- "@morpho-org/blue-sdk-ethers" | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Setup Node CI | ||
uses: ./.github/actions/setup-node | ||
|
||
- name: Build package | ||
run: yarn workspace ${{ matrix.package }} build | ||
|
||
- name: Test package | ||
run: yarn workspace ${{ matrix.package }} test --passWithNoTests |
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,19 @@ | ||
name: Publish on NPM | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-to-npm: | ||
name: Publish to NPM | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Setup Node CI | ||
uses: ./.github/actions/setup-node | ||
|
||
- name: Publish to npm | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
yarn run publish --y |
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,74 @@ | ||
# IDE | ||
.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# testing | ||
coverage | ||
.nyc_output | ||
.mp4 | ||
|
||
# production | ||
build | ||
artifacts | ||
dist | ||
packages/**/lib | ||
sdks/**/lib | ||
services/**/lib | ||
services/**/.esbuild | ||
services/**/.serverless | ||
|
||
# misc | ||
.DS_Store | ||
*.env* | ||
!*.env.example* | ||
!*.env.test | ||
*.pem | ||
stats-*.json | ||
**/disk-store | ||
|
||
|
||
# debug | ||
cache | ||
*.log* | ||
*.tsbuildinfo | ||
|
||
# yarn | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
|
||
# auto generated files | ||
manifest.json | ||
!**/public/manifest.json | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Local | ||
local_* | ||
|
||
# Cypress | ||
**/cypress/videos | ||
**/cypress/screenshots | ||
|
||
# Local Netlify folder | ||
.netlify |
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,10 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
STAGED_TS_FILES=$(git diff --staged --name-only --diff-filter=d | grep '\.tsx\?$' | xargs) | ||
|
||
if [ -n "$STAGED_TS_FILES" ]; then | ||
# yarn eslint --fix $STAGED_TS_FILES | ||
yarn prettier --write $STAGED_TS_FILES | ||
git add $STAGED_TS_FILES | ||
fi |
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,92 @@ | ||
# IDE | ||
.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# testing | ||
coverage | ||
.nyc_output | ||
.mp4 | ||
|
||
# production | ||
build | ||
dist | ||
packages/**/lib | ||
sdks/**/lib | ||
services/**/lib | ||
services/**/.esbuild | ||
services/**/.serverless | ||
|
||
# misc | ||
.DS_Store | ||
*.env* | ||
!*.env.example* | ||
!*.env.test | ||
*.pem | ||
stats-*.json | ||
**/disk-store | ||
|
||
|
||
# debug | ||
cache | ||
*.log* | ||
*.tsbuildinfo | ||
|
||
# yarn | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
|
||
# auto generated files | ||
manifest.json | ||
!**/public/manifest.json | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Local | ||
local_* | ||
|
||
# Cypress | ||
**/cypress/videos | ||
**/cypress/screenshots | ||
|
||
# Local Netlify folder | ||
.netlify | ||
|
||
# next.js | ||
.next | ||
out | ||
|
||
|
||
|
||
# Ignore artifacts | ||
**/.next | ||
**/out | ||
**/deployments | ||
**/generated | ||
|
||
.json | ||
**/.yarn | ||
|
||
*.hbs | ||
artifacts | ||
typechain-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,14 @@ | ||
module.exports = { | ||
importOrder: [ | ||
"^react.*", | ||
"^(?![@\\.]).*", | ||
"^@(?!morpho|/).*", | ||
"^@morpho.*", | ||
"^@", | ||
"^\\.\\.", | ||
"^\\.", | ||
], | ||
importOrderSeparation: true, | ||
importOrderParserPlugins: ["typescript", "decorators-legacy"], | ||
plugins: [require("@trivago/prettier-plugin-sort-imports")], | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, register} = require(`module`); | ||
const {resolve} = require(`path`); | ||
const {pathToFileURL} = require(`url`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); | ||
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint/bin/eslint.js | ||
require(absPnpApiPath).setup(); | ||
if (isPnpLoaderEnabled && register) { | ||
register(pathToFileURL(absPnpLoaderPath)); | ||
} | ||
} | ||
} | ||
|
||
// Defer to the real eslint/bin/eslint.js your application uses | ||
module.exports = absRequire(`eslint/bin/eslint.js`); |
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 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, register} = require(`module`); | ||
const {resolve} = require(`path`); | ||
const {pathToFileURL} = require(`url`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); | ||
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint | ||
require(absPnpApiPath).setup(); | ||
if (isPnpLoaderEnabled && register) { | ||
register(pathToFileURL(absPnpLoaderPath)); | ||
} | ||
} | ||
} | ||
|
||
// Defer to the real eslint your application uses | ||
module.exports = absRequire(`eslint`); |
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 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire, register} = require(`module`); | ||
const {resolve} = require(`path`); | ||
const {pathToFileURL} = require(`url`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); | ||
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint/use-at-your-own-risk | ||
require(absPnpApiPath).setup(); | ||
if (isPnpLoaderEnabled && register) { | ||
register(pathToFileURL(absPnpLoaderPath)); | ||
} | ||
} | ||
} | ||
|
||
// Defer to the real eslint/use-at-your-own-risk your application uses | ||
module.exports = absRequire(`eslint/use-at-your-own-risk`); |
Oops, something went wrong.