Page MenuHomePhabricator

[ecash-agora] Update linter settings for monorepo consistency
ClosedPublic

Authored by bytesofman on Mon, Nov 4, 17:49.

Details

Summary

Update linter settings for monorepo consistency. Lint.

Test Plan

npm test
eslint . and no output

Diff Detail

Repository
rABC Bitcoin ABC
Branch
ecash-agora-eslint
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30988
Build 61479: Build Diffcashtab-tests · ecash-agora-tests · ecash-agora-integration-tests
Build 61478: arc lint + arc unit

Event Timeline

back out the no-use-before-undefined changes, remove ignore-next-line since rule is patched

Tail of the build log:

   Compiling log v0.4.21
   Compiling cc v1.0.92
   Compiling thiserror v1.0.58
   Compiling wasm-bindgen v0.2.92
   Compiling cfg-if v1.0.0
   Compiling abc-rust-lint v0.1.0 (/work/chronik/abc-rust-lint)
   Compiling generic-array v0.14.7
   Compiling quote v1.0.36
   Compiling syn v2.0.72
   Compiling ecash-secp256k1-sys v0.10.0 (/work/modules/ecash-secp256k1/ecash-secp256k1-sys)
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling digest v0.10.7
   Compiling sha2 v0.10.8
   Compiling ripemd v0.1.3
   Compiling wasm-bindgen-backend v0.2.92
   Compiling ecash-secp256k1 v0.30.0 (/work/modules/ecash-secp256k1)
   Compiling thiserror-impl v1.0.58
   Compiling wasm-bindgen-macro-support v0.2.92
   Compiling wasm-bindgen-macro v0.2.92
   Compiling ecash-lib-wasm v0.1.0 (/work/modules/ecash-lib-wasm)
    Finished release-wasm [optimized] target(s) in 5.14s
/work/modules/ecash-lib /work/modules/ecash-lib-wasm /work/modules/ecash-script /work/modules/chronik-client /work/modules/mock-chronik-client /work/modules/ecashaddrjs /work/abc-ci-builds/cashtab-tests

added 363 packages, and audited 366 packages in 2s

60 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-lib@0.2.1 build
> tsc && tsc -p ./tsconfig.build.json && cp -r ./src/ffi ./dist

Installing ecash-agora dependencies...
/work/modules/ecash-agora /work/modules/ecash-lib /work/modules/ecash-lib-wasm /work/modules/ecash-script /work/modules/chronik-client /work/modules/mock-chronik-client /work/modules/ecashaddrjs /work/abc-ci-builds/cashtab-tests

added 364 packages, and audited 367 packages in 1s

60 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-agora@0.1.1 build
> tsc && tsc -p ./tsconfig.build.json

tests/partial.locktime.test.ts(87,9): error TS2552: Cannot find name 'makerScriptHex'. Did you mean 'makerScript'?
tests/partial.locktime.test.ts(92,9): error TS2552: Cannot find name 'takerScriptHex'. Did you mean 'takerScript'?
Build cashtab-tests failed with exit code 2

Tail of the build log:

   Compiling once_cell v1.19.0
   Compiling log v0.4.21
   Compiling wasm-bindgen v0.2.92
   Compiling thiserror v1.0.58
   Compiling cfg-if v1.0.0
   Compiling abc-rust-lint v0.1.0 (/work/chronik/abc-rust-lint)
   Compiling generic-array v0.14.7
   Compiling quote v1.0.36
   Compiling syn v2.0.72
   Compiling ecash-secp256k1-sys v0.10.0 (/work/modules/ecash-secp256k1/ecash-secp256k1-sys)
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling digest v0.10.7
   Compiling ripemd v0.1.3
   Compiling sha2 v0.10.8
   Compiling wasm-bindgen-backend v0.2.92
   Compiling thiserror-impl v1.0.58
   Compiling ecash-secp256k1 v0.30.0 (/work/modules/ecash-secp256k1)
   Compiling wasm-bindgen-macro-support v0.2.92
   Compiling wasm-bindgen-macro v0.2.92
   Compiling ecash-lib-wasm v0.1.0 (/work/modules/ecash-lib-wasm)
    Finished release-wasm [optimized] target(s) in 4.75s
/work/modules/ecash-lib /work/modules/ecash-lib-wasm /work/modules/ecash-script /work/modules/chronik-client /work/modules/mock-chronik-client /work/modules/ecashaddrjs /work/abc-ci-builds/cashtab-tests

added 363 packages, and audited 366 packages in 2s

60 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-lib@0.2.1 build
> tsc && tsc -p ./tsconfig.build.json && cp -r ./src/ffi ./dist

Installing ecash-agora dependencies...
/work/modules/ecash-agora /work/modules/ecash-lib /work/modules/ecash-lib-wasm /work/modules/ecash-script /work/modules/chronik-client /work/modules/mock-chronik-client /work/modules/ecashaddrjs /work/abc-ci-builds/cashtab-tests

added 364 packages, and audited 367 packages in 1s

60 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-agora@0.1.1 build
> tsc && tsc -p ./tsconfig.build.json

tests/partial.locktime.test.ts(87,9): error TS2552: Cannot find name 'makerScriptHex'. Did you mean 'makerScript'?
tests/partial.locktime.test.ts(92,9): error TS2552: Cannot find name 'takerScriptHex'. Did you mean 'takerScript'?
Build cashtab-tests failed with exit code 2

Failed tests logs:

====== AgoraPartial enforcedLockTime: "before all" hook for "AgoraPartial enforcedLockTime".AgoraPartial enforcedLockTime "before all" hook for "AgoraPartial enforcedLockTime" ======
ReferenceError: makerScriptHex is not defined
    at Context.<anonymous> (tests/partial.locktime.test.ts:87:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Each failure log is accessible here:
AgoraPartial enforcedLockTime: "before all" hook for "AgoraPartial enforcedLockTime".AgoraPartial enforcedLockTime "before all" hook for "AgoraPartial enforcedLockTime"

Failed tests logs:

====== AgoraPartial enforcedLockTime: "before all" hook for "AgoraPartial enforcedLockTime".AgoraPartial enforcedLockTime "before all" hook for "AgoraPartial enforcedLockTime" ======
ReferenceError: makerScriptHex is not defined
    at Context.<anonymous> (tests/partial.locktime.test.ts:87:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Each failure log is accessible here:
AgoraPartial enforcedLockTime: "before all" hook for "AgoraPartial enforcedLockTime".AgoraPartial enforcedLockTime "before all" hook for "AgoraPartial enforcedLockTime"

bytesofman published this revision for review.Mon, Nov 4, 19:01
emack requested changes to this revision.Tue, Nov 5, 04:18
emack added a subscriber: emack.
emack added inline comments.
modules/ecash-agora/tests/partial.locktime.test.ts
22

image.png (114×1 px, 22 KB)

This revision now requires changes to proceed.Tue, Nov 5, 04:18

fix lingering eslint error

This revision is now accepted and ready to land.Tue, Nov 5, 06:23