hyperledger / cacti

Hyperledger Cacti is a new approach to the blockchain interoperability problem
https://wiki.hyperledger.org/display/cactus
Apache License 2.0
338 stars 281 forks source link

style: 2021-09-20 linter warnings batch 17 / 26; part 1 #2091

Closed Leeyoungone closed 1 year ago

Leeyoungone commented 2 years ago

This is the UPDATED list of linter warnings that are avaliable as of 06-21-22! @alec-p-hong

Description

As of today (21s of September, 2022) I have sectioned off issue #1366 into chunks of "10" based on the IDs that the linters were originally given. I've gone through them and have sectioned it off by 1 - 10 but some linter warnings from the orignal issue (ex. linter warning 28), do not exist so not all the PRs will have 10 linter warnings at a time.

From the original issue:

For example if an issue has 1 / 26 in it's title, that's batch number one, meaning that the linter warnings that needs to be fixed in the scope of that task are the ones with IDs of 1 to 10, inclusive, as in 1,2,3,4,5,6,7,8,9,10. For 2 / 26 in the title, that's batch #2 and the corresponding warnings IDs in the main table are therefore: 11,12,13,14,15,16,17,18,19,20. For 3 / 26 in the title, that's batch #3 you get the point...

Acceptance Criteria

  1. Each linter warning is either fixed or a specific new issue is created aimed at exactly that one linter warning where applicable: If fixing a linter warning requires a larger refactoring of the codebase, then it is justifiable to break it out into it's own GH task.
  2. The pull request submitted links to all (if any) additional issues that were created for the linter warnings that did not fit in the scope of the issue.

Full List of Linter Warnings

Important: Do not fix all of these, just a subset of them as per the guidelines in the Description section above. Otherwise your pull request might get rejected due to unfixable conflicts.

ID Description
1 /examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/index.ts: line 578, col 25, Warning - Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
2 ./examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissionsRecordContract.ts: line 40, col 3, Warning - Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)
3 ./examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissionsRecordContract.ts: line 138, col 3, Warning - Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)
4 ./examples/cactus-example-carbon-accounting-backend/src/utility-emissions-channel/typescript/src/lib/emissionsRecordContract.ts: line 146, col 3, Warning - Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)
5 ./examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/dao-token/get-allowance-endpoint.ts: line 58, col 33, Warning - Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
6 ./examples/cactus-example-carbon-accounting-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/utility-emissions-channel/enroll-admin-v1-endpoint.ts: line 54, col 25, Warning - Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
7 ./examples/cactus-example-carbon-accounting-frontend/src/zone-flags.ts: line 5, col 12, Warning - Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
8 ./examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-bamboo-harvest-endpoint.ts: line 77, col 3, Warning - Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)
9 ./examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-bookshelf-endpoint.ts: line 59, col 3, Warning - Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)
10 ./examples/cactus-example-supply-chain-business-logic-plugin/src/main/typescript/business-logic-plugin/web-services/insert-shipment-endpoint.ts: line 69, col 3, Warning - Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)
petermetz commented 1 year ago

Closing due to the linter numbers having gone stale in the meantime. We need to invent a better way of tracking linter warnings for future issues like this that we'll open because the line numbers are ephemeral and therefore not well suited for this.

Please see these if you'd still like to work on linter warnings that are beginner-friendly: https://github.com/hyperledger/cacti/issues/2674 https://github.com/hyperledger/cacti/issues/2675