-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from stakewise/config-sdk
Config sdk
- Loading branch information
Showing
99 changed files
with
33,607 additions
and
40,795 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,70 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
"plugin:import/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"ignorePatterns": [ | ||
"hardhat.config.js", | ||
"**/types/*.ts", | ||
"*.graphql.ts", | ||
"scripts/*", | ||
"dist/*", | ||
"*.d.ts" | ||
], | ||
"plugins": [ | ||
"import", | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
|
||
// Common | ||
|
||
"no-trailing-spaces": 1, | ||
"semi": [ "error", "never" ], | ||
"max-len": [ "warn", { "code": 140 } ], | ||
"@typescript-eslint/ban-ts-comment": [ | ||
"error", | ||
{ | ||
"ts-ignore": "allow-with-description" | ||
} | ||
], | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"object-curly-spacing": [ "error", "always" ], | ||
"array-bracket-spacing": [ "error", "always" ], | ||
"no-multiple-empty-lines": [ "error", { "max": 2 } ], | ||
"jsx-a11y/alt-text": 0, | ||
"comma-dangle": [ | ||
"warn", { | ||
"arrays": "always-multiline", | ||
"objects": "always-multiline", | ||
"imports": "always-multiline", | ||
"exports": "always-multiline", | ||
"functions": "never" | ||
} | ||
], | ||
|
||
// Special | ||
|
||
"no-restricted-globals": [ "error", { | ||
"name": "localStorage", | ||
"message": "Use localStorage module from @stakewise/frontwise-modules!" | ||
} ], | ||
|
||
// Import plugin | ||
|
||
"import/first": 0, | ||
"import/extensions": 0, | ||
"import/no-unresolved": 0, | ||
"import/no-dynamic-require": 0, | ||
"import/prefer-default-export": 0, | ||
"import/no-webpack-loader-syntax": 0, | ||
"import/no-named-as-default-member": 1, | ||
"import/no-extraneous-dependencies": 0, | ||
"import/no-anonymous-default-export": 0, | ||
"import/newline-after-import": [ "error", { "count": 2 } ] | ||
} | ||
} |
Validating CODEOWNERS rules …
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 @@ | ||
@dfkadyr @mike-diamond @Cast0001 |
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,32 @@ | ||
name: Unit tests | ||
|
||
on: | ||
pull_request: | ||
branches: [ main, prod ] | ||
|
||
jobs: | ||
audit: | ||
name: Checking | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 | ||
- name: Setup node and npm | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: npm | ||
scope: '@stakewise' | ||
node-version: '18.16.1' | ||
registry-url: "https://npm.pkg.github.com" | ||
cache-dependency-path: "**/package-lock.json" | ||
- name: Install npm dependencies | ||
run: "npm ci --ignore-scripts" | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{ github.token }} | ||
- name: Checking | ||
run: npm run prepare && npm run test | ||
shell: bash |
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 |
---|---|---|
@@ -1,5 +1,16 @@ | ||
.idea | ||
.vscode | ||
.rollup.cache | ||
tsconfig.tsbuildinfo | ||
|
||
dist | ||
types | ||
cache | ||
coverage | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# Types | ||
schema.graphql | ||
*.graphql.ts |
File renamed without changes.
File renamed without changes.
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run test | ||
npm run test && npx eslint ./src |
File renamed without changes.
This file was deleted.
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
File renamed without changes.
This file was deleted.
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 @@ | ||
import type { Config } from 'jest' | ||
|
||
|
||
const config: Config = { | ||
rootDir: '.', | ||
verbose: true, | ||
preset: 'ts-jest', | ||
resetMocks: true, | ||
testEnvironment: 'node', | ||
testMatch: [ '**/*.spec.ts' ], | ||
collectCoverageFrom: [ 'src/**/*.ts' ], | ||
moduleFileExtensions: [ 'json', 'js', 'ts' ], | ||
modulePathIgnorePatterns: [ '<rootDir>/src/helpers' ], | ||
transform: { | ||
'\\.[jt]sx?$': 'ts-jest', | ||
}, | ||
globals: { | ||
isolatedModules: true, | ||
}, | ||
moduleNameMapper: { | ||
'^helpers$': require.resolve('./src/helpers/index.ts'), | ||
'^graphql$': require.resolve('./src/graphql/index.ts'), | ||
}, | ||
} | ||
|
||
|
||
export default config |
Oops, something went wrong.