Skip to content

Commit 3bf7a0c

Browse files
committed
client folder config
1 parent 5ad60bb commit 3bf7a0c

5 files changed

Lines changed: 105 additions & 322 deletions

File tree

packages/client/.eslintrc.js

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,82 @@
11
module.exports = {
22
root: true,
3-
extends: ['preact'],
4-
settings: {
5-
react: {
6-
pragma: "h",
7-
},
8-
},
93
env: {
10-
browser: true,
4+
'react-native/react-native': true,
115
es2021: true,
126
node: true,
13-
commonjs: true,
147
},
158
plugins: [
16-
"@typescript-eslint",
17-
"simple-import-sort",
18-
"unused-imports",
19-
"prettier",
9+
'react',
10+
'react-native',
11+
'@typescript-eslint',
12+
'simple-import-sort',
13+
'unused-imports',
14+
'prettier',
2015
],
2116
extends: [
22-
"eslint:recommended",
23-
"plugin:@typescript-eslint/recommended",
24-
"plugin:prettier/recommended",
17+
'eslint:recommended',
18+
'plugin:@typescript-eslint/recommended',
19+
'plugin:react/recommended',
20+
'plugin:react-hooks/recommended',
21+
'plugin:react-native/all',
22+
'plugin:prettier/recommended',
2523
],
26-
parser: "@typescript-eslint/parser",
24+
parser: '@typescript-eslint/parser',
2725
parserOptions: {
28-
ecmaVersion: "latest",
29-
sourceType: "module",
26+
ecmaVersion: 'latest',
27+
sourceType: 'module',
3028
},
3129
rules: {
32-
"@typescript-eslint/no-unused-vars": "off",
33-
"simple-import-sort/imports": [
34-
"error",
30+
'@typescript-eslint/no-unused-vars': 'off',
31+
'simple-import-sort/imports': [
32+
'error',
3533
{
36-
groups: [["^\\u0000"], ["^@?\\w"], ["^src(/.*|$)"]],
34+
groups: [['^\\u0000'], ['^@?\\w'], ['^src(/.*|$)']],
3735
},
3836
],
39-
"simple-import-sort/exports": "error",
40-
"no-unused-vars": "off",
41-
"unused-imports/no-unused-imports": "error",
42-
"unused-imports/no-unused-vars": [
43-
"error",
37+
'simple-import-sort/exports': 'error',
38+
'no-unused-vars': 'off',
39+
'unused-imports/no-unused-imports': 'error',
40+
'unused-imports/no-unused-vars': [
41+
'error',
4442
{
45-
vars: "all",
46-
varsIgnorePattern: "^_",
47-
args: "after-used",
48-
argsIgnorePattern: "^_",
43+
vars: 'all',
44+
varsIgnorePattern: '^_',
45+
args: 'after-used',
46+
argsIgnorePattern: '^_',
4947
},
5048
],
51-
"no-console": [
52-
"error",
49+
'no-console': [
50+
'error',
5351
{
54-
allow: ["warn", "error", "info"],
52+
allow: ['warn', 'error', 'info'],
5553
},
5654
],
57-
"prettier/prettier": [
58-
"error",
55+
'prettier/prettier': [
56+
'error',
5957
{
60-
arrowParens: "always",
58+
arrowParens: 'always',
6159
bracketSpacing: true,
62-
endOfLine: "lf",
63-
htmlWhitespaceSensitivity: "css",
60+
endOfLine: 'lf',
61+
htmlWhitespaceSensitivity: 'css',
6462
printWidth: 100,
65-
quoteProps: "as-needed",
63+
quoteProps: 'as-needed',
6664
semi: true,
6765
singleQuote: true,
6866
tabWidth: 2,
69-
trailingComma: "es5",
67+
trailingComma: 'es5',
7068
useTabs: false,
7169
},
7270
],
7371
// TODO: change this back to error
74-
"@typescript-eslint/no-explicit-any": "warn",
72+
'@typescript-eslint/no-explicit-any': 'warn',
7573
},
7674
overrides: [
7775
{
78-
files: ["**/*.test.*"],
76+
files: ['**/*.test.*'],
7977
rules: {
80-
"@typescript-eslint/no-explicit-any": "off"
81-
}
82-
}
83-
]
78+
'@typescript-eslint/no-explicit-any': 'off',
79+
},
80+
},
81+
],
8482
};

packages/client/.npmignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,3 @@ release.sh
1717
jest.setup.ts
1818
jest.config.ts
1919
coverage/**
20-
21-
compile-assets.js

packages/client/compile-assets.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/client/package.json

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@
33
"version": "0.0.1",
44
"description": "Client SDK for the Mobile Wallet Protocol",
55
"keywords": [
6-
"coinbase",
7-
"coinbasewallet",
6+
"react-native",
7+
"expo",
88
"eth",
99
"ethereum",
1010
"wallet",
11-
"walletlink",
12-
"web3"
11+
"web3",
12+
"coinbase",
13+
"coinbasewallet"
1314
],
1415
"main": "dist/index.js",
15-
"react-native": "dist/index.native.js",
1616
"types": "dist/index.d.ts",
1717
"sideEffects": false,
18-
"repository": "https://github.com/coinbase/coinbase-wallet-sdk.git",
18+
"repository": "https://github.com/MobileWalletProtocol/wallet-mobile-sdk.git",
1919
"author": "Coinbase, Inc.",
2020
"license": "Apache-2.0",
2121
"scripts": {
22-
"pretest": "node compile-assets.js",
2322
"test": "jest",
2423
"test:coverage": "yarn test:unit && open coverage/lcov-report/index.html",
2524
"prebuild": "rm -rf ./build && node -p \"'export const LIB_VERSION = \\'' + require('./package.json').version + '\\';'\" > src/version.ts",
26-
"build": "node compile-assets.js && tsc -p ./tsconfig.build.json && tsc-alias && cp -a src/vendor-js dist",
27-
"dev": "node compile-assets.js && tsc --watch & nodemon --watch dist --delay 1 --exec tsc-alias",
25+
"build": "tsc -p ./tsconfig.build.json && tsc-alias && cp -a src/vendor-js dist",
26+
"dev": "tsc --watch & nodemon --watch dist --delay 1 --exec tsc-alias",
2827
"typecheck": "tsc --noEmit",
2928
"lint": "eslint . --ext .ts,.tsx --fix"
3029
},
@@ -33,8 +32,7 @@
3332
"@noble/curves": "^1.4.2",
3433
"@noble/hashes": "^1.4.0",
3534
"clsx": "^1.2.1",
36-
"eventemitter3": "^5.0.1",
37-
"preact": "^10.16.0"
35+
"eventemitter3": "^5.0.1"
3836
},
3937
"peerDependencies": {
4038
"@react-native-async-storage/async-storage": "*",
@@ -44,26 +42,6 @@
4442
"react-dom": "*",
4543
"react-native": "*"
4644
},
47-
"peerDependenciesMeta": {
48-
"@react-native-async-storage/async-storage": {
49-
"optional": true
50-
},
51-
"expo": {
52-
"optional": true
53-
},
54-
"expo-web-browser": {
55-
"optional": true
56-
},
57-
"react": {
58-
"optional": true
59-
},
60-
"react-dom": {
61-
"optional": true
62-
},
63-
"react-native": {
64-
"optional": true
65-
}
66-
},
6745
"devDependencies": {
6846
"@babel/core": "^7.22.9",
6947
"@babel/plugin-proposal-decorators": "^7.22.7",
@@ -83,9 +61,11 @@
8361
"@typescript-eslint/parser": "^6.2.0",
8462
"babel-jest": "^27.5.1",
8563
"eslint": "^8.45.0",
86-
"eslint-config-preact": "^1.3.0",
8764
"eslint-config-prettier": "^8.8.0",
8865
"eslint-plugin-prettier": "^5.0.0",
66+
"eslint-plugin-react": "^7.35.0",
67+
"eslint-plugin-react-hooks": "^4.6.2",
68+
"eslint-plugin-react-native": "^4.1.0",
8969
"eslint-plugin-simple-import-sort": "^10.0.0",
9070
"eslint-plugin-unused-imports": "^3.0.0",
9171
"expo-web-browser": "^13.0.3",
@@ -94,7 +74,6 @@
9474
"jest-websocket-mock": "^2.4.0",
9575
"nodemon": "^3.1.0",
9676
"prettier": "^3.0.0",
97-
"sass": "^1.64.1",
9877
"ts-jest": "^27.1.5",
9978
"ts-node": "^10.9.1",
10079
"tsc-alias": "^1.8.8",

0 commit comments

Comments
 (0)