-
Notifications
You must be signed in to change notification settings - Fork 4
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 a5ea9ba
Showing
126 changed files
with
19,853 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,24 @@ | ||
name: Lint code | ||
|
||
on: | ||
push: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: yarn | ||
|
||
- run: yarn install --immutable | ||
|
||
- 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,23 @@ | ||
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 | ||
|
||
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: yarn | ||
|
||
- run: yarn install --immutable | ||
|
||
- 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,36 @@ | ||
name: Build & test packages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
jest: | ||
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 | ||
|
||
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: yarn | ||
|
||
- run: yarn install --immutable | ||
|
||
- run: yarn workspace ${{ matrix.package }} build | ||
|
||
- 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,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 @@ | ||
20.11.0 |
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,15 @@ | ||
module.exports = { | ||
embeddedLanguageFormatting: "off", | ||
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`); |
Oops, something went wrong.