Skip to content

Commit

Permalink
Merge pull request #89 from allbridge-io/alpha
Browse files Browse the repository at this point in the history
Alpha
  • Loading branch information
Kozer4 authored Jan 28, 2025
2 parents 2d2e5df + f1cc941 commit b1478ba
Show file tree
Hide file tree
Showing 101 changed files with 12,395 additions and 12,210 deletions.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
"node_modules/**",
"src/configs/",
"src/__tests__/services/liquidity-pool/sol/data/",
"src/services/models/srb/token-contract.ts",
"src/services/models/srb/",
"src/services/models/abi/",
"src/services/utils/srb/assembled-tx.ts"
]
}
63 changes: 0 additions & 63 deletions .eslintrc.json

This file was deleted.

13 changes: 6 additions & 7 deletions .github/workflows/allbridge-core-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,25 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,25 @@ jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@ jobs:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
Expand Down
2 changes: 1 addition & 1 deletion esbuild-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const cache = {};

function esbuildHook(code, filepath) {
const result = transformSync(code, {
target: "node16",
target: "node22",
sourcemap: "both",
loader: "ts",
format: "cjs",
Expand Down
90 changes: 90 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import _import from "eslint-plugin-import";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["scripts/*", "**/esbuild-hook.js"],
}, ...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:eslint-comments/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier",
)), {
plugins: {
import: fixupPluginRules(_import),
"@typescript-eslint": fixupPluginRules(typescriptEslint),
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: "commonjs",

parserOptions: {
project: "./tsconfig.lint.json",
},
},

settings: {
"import/resolver": {
typescript: {
project: "tsconfig.json",
},
},
},

rules: {
"import/order": ["error", {
alphabetize: {
order: "asc",
caseInsensitive: true,
},
}],

"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-unused-modules": "error",

"@typescript-eslint/no-unused-vars": ["warn", {
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^ignore"
}],

"eslint-comments/no-unlimited-disable": "off",
"eslint-comments/disable-enable-pair": "off",
"@typescript-eslint/ban-tslint-comment": "off",
"@typescript-eslint/ban-ts-comment": ["warn", {
minimumDescriptionLength: 3,
}],

"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-explicit-any": "off",
},
}];
Loading

0 comments on commit b1478ba

Please sign in to comment.