Skip to content

Commit

Permalink
add await-thenable eslint rule, fix LndMobile interface, updated esli…
Browse files Browse the repository at this point in the history
…nt packages
  • Loading branch information
myxmaster committed Apr 12, 2024
1 parent c089a3c commit 2fb1201
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 107 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ babel.config.js
index.js
metro.config.js
shim.js
proto
proto
react-native.config.js
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ module.exports = {
root: true,
extends: ['@react-native', 'plugin:import/recommended', 'plugin:import/typescript'],
plugins: ['import'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
tsconfigRootDir: __dirname
},
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/camelcase': 'off',
Expand Down
6 changes: 3 additions & 3 deletions lndmobile/LndMobile.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export interface ILndMobileTools {
saveChannelsBackup(base64Backups: string): Promise<string>;
saveChannelBackupFile(network: string): Promise<boolean>;
DEBUG_getWalletPasswordFromKeychain(): Promise<string>;
DEBUG_deleteSpeedloaderLastrunFile(): boolean;
DEBUG_deleteSpeedloaderDgraphDirectory(): null;
DEBUG_deleteNeutrinoFiles(network: string): boolean;
DEBUG_deleteSpeedloaderLastrunFile(): Promise<boolean>;
DEBUG_deleteSpeedloaderDgraphDirectory(): Promise<null>;
DEBUG_deleteNeutrinoFiles(network: string): Promise<boolean>;

// Android-specific
getIntentStringData(): Promise<string | null>;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@
"@types/react-test-renderer": "18.0.2",
"@types/sha.js": "2.4.1",
"@types/uuid": "9.0.7",
"@typescript-eslint/eslint-plugin": "5.61.0",
"@typescript-eslint/parser": "6.7.5",
"@typescript-eslint/eslint-plugin": "6.13.1",
"@typescript-eslint/parser": "6.13.1",
"babel-jest": "29.7.0",
"compressing": "1.10.0",
"eslint": "8.45.0",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"skipLibCheck": true,
"baseUrl": "./",
"paths": {
"*" : ["typings/*"]
"*" : ["typings/*"]
}
},
"exclude": ["node_modules"],
"include": ["backends/*", "components/*", "models/*", "stores/*", "utils/*", "views/*", "typings/*"]
"include": ["**/*.ts", "**/*.tsx"]
}
2 changes: 1 addition & 1 deletion views/Channels/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class ChannelView extends React.Component<
);

if (implementation === 'lightning-node-connect') {
await this.subscribeChannelClose(streamingCall);
this.subscribeChannelClose(streamingCall);
} else {
if (!ChannelsStore.closeChannelErr) navigation.navigate('Wallet');
}
Expand Down
182 changes: 84 additions & 98 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@
dependencies:
"@types/hammerjs" "^2.0.36"

"@eslint-community/eslint-utils@^4.2.0":
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
Expand All @@ -1405,6 +1405,11 @@
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.0.tgz#7ccb5f58703fa61ffdcbf39e2c604a109e781162"
integrity sha512-zJmuCWj2VLBt4c25CfBIbMZLGLyhkvs7LznyVX5HfpzeocThgIj5XQK4L+g3U36mMcx8bPMhGyPpwCATamC4jQ==

"@eslint-community/regexpp@^4.5.1":
version "4.10.0"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63"
integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==

"@eslint/eslintrc@^2.1.0":
version "2.1.2"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396"
Expand Down Expand Up @@ -2623,6 +2628,11 @@
expect "^29.0.0"
pretty-format "^29.0.0"

"@types/json-schema@^7.0.12":
version "7.0.15"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==

"@types/json-schema@^7.0.9":
version "7.0.13"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85"
Expand Down Expand Up @@ -2757,6 +2767,11 @@
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04"
integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==

"@types/semver@^7.5.0":
version "7.5.6"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339"
integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==

"@types/sha.js@2.4.1":
version "2.4.1"
resolved "https://registry.yarnpkg.com/@types/sha.js/-/sha.js-2.4.1.tgz#d7c71b0035360cf120f0a8e8ed4a2eab07a0d51c"
Expand Down Expand Up @@ -2793,21 +2808,22 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/eslint-plugin@5.61.0":
version "5.61.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz#a1a5290cf33863b4db3fb79350b3c5275a7b1223"
integrity sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g==
"@typescript-eslint/eslint-plugin@6.13.1":
version "6.13.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.1.tgz#f98bd887bf95551203c917e734d113bf8d527a0c"
integrity sha512-5bQDGkXaxD46bPvQt08BUz9YSaO4S0fB1LB5JHQuXTfkGPI3+UUeS387C/e9jRie5GqT8u5kFTrMvAjtX4O5kA==
dependencies:
"@eslint-community/regexpp" "^4.4.0"
"@typescript-eslint/scope-manager" "5.61.0"
"@typescript-eslint/type-utils" "5.61.0"
"@typescript-eslint/utils" "5.61.0"
"@eslint-community/regexpp" "^4.5.1"
"@typescript-eslint/scope-manager" "6.13.1"
"@typescript-eslint/type-utils" "6.13.1"
"@typescript-eslint/utils" "6.13.1"
"@typescript-eslint/visitor-keys" "6.13.1"
debug "^4.3.4"
graphemer "^1.4.0"
ignore "^5.2.0"
natural-compare-lite "^1.4.0"
semver "^7.3.7"
tsutils "^3.21.0"
ignore "^5.2.4"
natural-compare "^1.4.0"
semver "^7.5.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/eslint-plugin@^5.57.1":
version "5.62.0"
Expand All @@ -2825,15 +2841,15 @@
semver "^7.3.7"
tsutils "^3.21.0"

"@typescript-eslint/parser@6.7.5":
version "6.7.5"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.5.tgz#8d7ca3d1fbd9d5a58cc4d30b2aa797a760137886"
integrity sha512-bIZVSGx2UME/lmhLcjdVc7ePBwn7CLqKarUBL4me1C5feOd663liTGjMBGVcGr+BhnSLeP4SgwdvNnnkbIdkCw==
"@typescript-eslint/parser@6.13.1":
version "6.13.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.13.1.tgz#29d6d4e5fab4669e58bc15f6904b67da65567487"
integrity sha512-fs2XOhWCzRhqMmQf0eicLa/CWSaYss2feXsy7xBD/pLyWke/jCIVc2s1ikEAtSW7ina1HNhv7kONoEfVNEcdDQ==
dependencies:
"@typescript-eslint/scope-manager" "6.7.5"
"@typescript-eslint/types" "6.7.5"
"@typescript-eslint/typescript-estree" "6.7.5"
"@typescript-eslint/visitor-keys" "6.7.5"
"@typescript-eslint/scope-manager" "6.13.1"
"@typescript-eslint/types" "6.13.1"
"@typescript-eslint/typescript-estree" "6.13.1"
"@typescript-eslint/visitor-keys" "6.13.1"
debug "^4.3.4"

"@typescript-eslint/parser@^5.57.1":
Expand All @@ -2846,14 +2862,6 @@
"@typescript-eslint/typescript-estree" "5.62.0"
debug "^4.3.4"

"@typescript-eslint/scope-manager@5.61.0":
version "5.61.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz#b670006d069c9abe6415c41f754b1b5d949ef2b2"
integrity sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==
dependencies:
"@typescript-eslint/types" "5.61.0"
"@typescript-eslint/visitor-keys" "5.61.0"

"@typescript-eslint/scope-manager@5.62.0":
version "5.62.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c"
Expand All @@ -2862,23 +2870,13 @@
"@typescript-eslint/types" "5.62.0"
"@typescript-eslint/visitor-keys" "5.62.0"

"@typescript-eslint/scope-manager@6.7.5":
version "6.7.5"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.5.tgz#1cf33b991043886cd67f4f3600b8e122fc14e711"
integrity sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A==
dependencies:
"@typescript-eslint/types" "6.7.5"
"@typescript-eslint/visitor-keys" "6.7.5"

"@typescript-eslint/type-utils@5.61.0":
version "5.61.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz#e90799eb2045c4435ea8378cb31cd8a9fddca47a"
integrity sha512-kk8u//r+oVK2Aj3ph/26XdH0pbAkC2RiSjUYhKD+PExemG4XSjpGFeyZ/QM8lBOa7O8aGOU+/yEbMJgQv/DnCg==
"@typescript-eslint/scope-manager@6.13.1":
version "6.13.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.13.1.tgz#58c7c37c6a957d3d9f59bc4f64c2888e0cac1d70"
integrity sha512-BW0kJ7ceiKi56GbT2KKzZzN+nDxzQK2DS6x0PiSMPjciPgd/JRQGMibyaN2cPt2cAvuoH0oNvn2fwonHI+4QUQ==
dependencies:
"@typescript-eslint/typescript-estree" "5.61.0"
"@typescript-eslint/utils" "5.61.0"
debug "^4.3.4"
tsutils "^3.21.0"
"@typescript-eslint/types" "6.13.1"
"@typescript-eslint/visitor-keys" "6.13.1"

"@typescript-eslint/type-utils@5.62.0":
version "5.62.0"
Expand All @@ -2890,33 +2888,25 @@
debug "^4.3.4"
tsutils "^3.21.0"

"@typescript-eslint/types@5.61.0":
version "5.61.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.61.0.tgz#e99ff11b5792d791554abab0f0370936d8ca50c0"
integrity sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==
"@typescript-eslint/type-utils@6.13.1":
version "6.13.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.13.1.tgz#e6e5885e387841cae9c38fc0638fd8b7561973d6"
integrity sha512-A2qPlgpxx2v//3meMqQyB1qqTg1h1dJvzca7TugM3Yc2USDY+fsRBiojAEo92HO7f5hW5mjAUF6qobOPzlBCBQ==
dependencies:
"@typescript-eslint/typescript-estree" "6.13.1"
"@typescript-eslint/utils" "6.13.1"
debug "^4.3.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/types@5.62.0":
version "5.62.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f"
integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==

"@typescript-eslint/types@6.7.5":
version "6.7.5"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.5.tgz#4571320fb9cf669de9a95d9849f922c3af809790"
integrity sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==

"@typescript-eslint/typescript-estree@5.61.0":
version "5.61.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz#4c7caca84ce95bb41aa585d46a764bcc050b92f3"
integrity sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==
dependencies:
"@typescript-eslint/types" "5.61.0"
"@typescript-eslint/visitor-keys" "5.61.0"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/types@6.13.1":
version "6.13.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.13.1.tgz#b56f26130e7eb8fa1e429c75fb969cae6ad7bb5c"
integrity sha512-gjeEskSmiEKKFIbnhDXUyiqVma1gRCQNbVZ1C8q7Zjcxh3WZMbzWVfGE9rHfWd1msQtPS0BVD9Jz9jded44eKg==

"@typescript-eslint/typescript-estree@5.62.0":
version "5.62.0"
Expand All @@ -2931,33 +2921,19 @@
semver "^7.3.7"
tsutils "^3.21.0"

"@typescript-eslint/typescript-estree@6.7.5":
version "6.7.5"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.5.tgz#4578de1a26e9f24950f029a4f00d1bfe41f15a39"
integrity sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==
"@typescript-eslint/typescript-estree@6.13.1":
version "6.13.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.1.tgz#d01dda78d2487434d1c503853fa00291c566efa4"
integrity sha512-sBLQsvOC0Q7LGcUHO5qpG1HxRgePbT6wwqOiGLpR8uOJvPJbfs0mW3jPA3ujsDvfiVwVlWUDESNXv44KtINkUQ==
dependencies:
"@typescript-eslint/types" "6.7.5"
"@typescript-eslint/visitor-keys" "6.7.5"
"@typescript-eslint/types" "6.13.1"
"@typescript-eslint/visitor-keys" "6.13.1"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.5.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/utils@5.61.0":
version "5.61.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.61.0.tgz#5064838a53e91c754fffbddd306adcca3fe0af36"
integrity sha512-mV6O+6VgQmVE6+xzlA91xifndPW9ElFW8vbSF0xCT/czPXVhwDewKila1jOyRwa9AE19zKnrr7Cg5S3pJVrTWQ==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@types/json-schema" "^7.0.9"
"@types/semver" "^7.3.12"
"@typescript-eslint/scope-manager" "5.61.0"
"@typescript-eslint/types" "5.61.0"
"@typescript-eslint/typescript-estree" "5.61.0"
eslint-scope "^5.1.1"
semver "^7.3.7"

"@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.10.0":
version "5.62.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86"
Expand All @@ -2972,13 +2948,18 @@
eslint-scope "^5.1.1"
semver "^7.3.7"

"@typescript-eslint/visitor-keys@5.61.0":
version "5.61.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz#c79414fa42158fd23bd2bb70952dc5cdbb298140"
integrity sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==
dependencies:
"@typescript-eslint/types" "5.61.0"
eslint-visitor-keys "^3.3.0"
"@typescript-eslint/utils@6.13.1":
version "6.13.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.13.1.tgz#925b3a2453a71ada914ae329b7bb7e7d96634b2f"
integrity sha512-ouPn/zVoan92JgAegesTXDB/oUp6BP1v8WpfYcqh649ejNc9Qv+B4FF2Ff626kO1xg0wWwwG48lAJ4JuesgdOw==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
"@types/json-schema" "^7.0.12"
"@types/semver" "^7.5.0"
"@typescript-eslint/scope-manager" "6.13.1"
"@typescript-eslint/types" "6.13.1"
"@typescript-eslint/typescript-estree" "6.13.1"
semver "^7.5.4"

"@typescript-eslint/visitor-keys@5.62.0":
version "5.62.0"
Expand All @@ -2988,12 +2969,12 @@
"@typescript-eslint/types" "5.62.0"
eslint-visitor-keys "^3.3.0"

"@typescript-eslint/visitor-keys@6.7.5":
version "6.7.5"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.5.tgz#84c68d6ceb5b12d5246b918b84f2b79affd6c2f1"
integrity sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==
"@typescript-eslint/visitor-keys@6.13.1":
version "6.13.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.1.tgz#c4b692dcc23a4fc60685b718f10fde789d65a540"
integrity sha512-NDhQUy2tg6XGNBGDRm1XybOHSia8mcXmlbKWoQP+nm1BIIMxa55shyJfZkHpEBN62KNPLrocSM2PdPcaLgDKMQ==
dependencies:
"@typescript-eslint/types" "6.7.5"
"@typescript-eslint/types" "6.13.1"
eslint-visitor-keys "^3.4.1"

"@xmldom/xmldom@^0.8.8":
Expand Down Expand Up @@ -5759,6 +5740,11 @@ ignore@^5.0.5, ignore@^5.2.0:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==

ignore@^5.2.4:
version "5.3.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78"
integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==

image-size@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/image-size/-/image-size-1.0.2.tgz#d778b6d0ab75b2737c1556dd631652eb963bc486"
Expand Down

0 comments on commit 2fb1201

Please sign in to comment.