diff --git a/README.md b/README.md
index 11f96da21c9..a924a65f131 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,7 @@ taiko-mono/
├── packages
│ ├── branding: Taiko branding materials.
│ ├── bridge-ui: Taiko bridge frontend UI.
+│ ├── bridge-ui-v2: Taiko bridge frontend UI v2 (🚧 under construction 🚧).
│ ├── eventindexer: Event indexer.
│ ├── fork-diff: Fork diff page (currently, for geth).
│ ├── protocol: Taiko protocol and bridge smart contracts.
diff --git a/packages/bridge-ui-v2/.eslintrc.cjs b/packages/bridge-ui-v2/.eslintrc.cjs
index de411bb4fb6..70d7556f37d 100644
--- a/packages/bridge-ui-v2/.eslintrc.cjs
+++ b/packages/bridge-ui-v2/.eslintrc.cjs
@@ -2,7 +2,13 @@ module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:svelte/recommended', 'prettier'],
parser: '@typescript-eslint/parser',
- plugins: ['@typescript-eslint'],
+ plugins: ['@typescript-eslint', 'simple-import-sort'],
+ rules: {
+ 'linebreak-style': ['error', 'unix'],
+ 'simple-import-sort/imports': 'error',
+ 'simple-import-sort/exports': 'error',
+ 'no-console': ['error', { allow: ['warn', 'error'] }],
+ },
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
@@ -21,5 +27,13 @@ module.exports = {
parser: '@typescript-eslint/parser',
},
},
+ {
+ files: ['*.ts', '*.svelte'],
+ rules: {
+ // TS will take care of this potential error. For more information please visit:
+ // https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
+ 'no-undef': 'off',
+ },
+ },
],
};
diff --git a/packages/bridge-ui-v2/.prettierrc b/packages/bridge-ui-v2/.prettierrc
index e73c41e8efd..aa5a4f5d3de 100644
--- a/packages/bridge-ui-v2/.prettierrc
+++ b/packages/bridge-ui-v2/.prettierrc
@@ -1,6 +1,7 @@
{
"semi": true,
"tabWidth": 2,
+ "useTabs": false,
"printWidth": 120,
"singleQuote": true,
"trailingComma": "all",
diff --git a/packages/bridge-ui-v2/package.json b/packages/bridge-ui-v2/package.json
index 86fb84c8c28..b7bd0e1e909 100644
--- a/packages/bridge-ui-v2/package.json
+++ b/packages/bridge-ui-v2/package.json
@@ -26,6 +26,7 @@
"daisyui": "3.1.1",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
+ "eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-svelte": "^2.26.0",
"postcss": "^8.4.24",
"prettier": "^2.8.0",
@@ -43,6 +44,7 @@
"@wagmi/core": "^1.2.0",
"@web3modal/ethereum": "^2.4.7",
"@web3modal/html": "^2.4.7",
+ "debug": "^4.3.4",
"viem": "^1.0.7"
}
}
diff --git a/packages/bridge-ui-v2/src/app.d.ts b/packages/bridge-ui-v2/src/app.d.ts
index 899c7e8fcaa..bbbab873cae 100644
--- a/packages/bridge-ui-v2/src/app.d.ts
+++ b/packages/bridge-ui-v2/src/app.d.ts
@@ -7,6 +7,10 @@ declare global {
// interface PageData {}
// interface Platform {}
}
+
+ type Maybe = T | null | undefined;
+ type MaybeArray = T | T[] | null | undefined;
+ type MaybePromise = T | Promise | null | undefined;
}
export {};
diff --git a/packages/bridge-ui-v2/src/app.html b/packages/bridge-ui-v2/src/app.html
index 055757421a5..ff9d5e137ce 100644
--- a/packages/bridge-ui-v2/src/app.html
+++ b/packages/bridge-ui-v2/src/app.html
@@ -3,10 +3,28 @@
+
+
+
+
+
+
%sveltekit.head%
+
+
- %sveltekit.body%
+ %sveltekit.body%