fix: resolve lint errors across repo and strengthen CI enforcement#5228
fix: resolve lint errors across repo and strengthen CI enforcement#5228bootcodes wants to merge 72 commits intohiero-ledger:mainfrom
Conversation
Not up to standards ⛔🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
TIP This summary will be updated as you push new changes. Give us feedback
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (30.49%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
@@ Coverage Diff @@
## main #5228 +/- ##
===========================================
- Coverage 95.93% 73.50% -22.43%
===========================================
Files 146 147 +1
Lines 25140 25181 +41
Branches 2044 848 -1196
===========================================
- Hits 24117 18510 -5607
- Misses 1001 6646 +5645
- Partials 22 25 +3
... and 61 files with indirect coverage changes 🚀 New features to boost your workflow:
|
jasuwienas
left a comment
There was a problem hiding this comment.
Overall, it looks great. I’m just not sure whether it’s correct to treat null the same as undefined in places where we previously distinguished between the two. I don’t think this PR should introduce business-level changes to the application, even if they make sense.
quiet-node
left a comment
There was a problem hiding this comment.
Great work overall! Left some items
| response != null && | ||
| response.transaction_index != null && | ||
| response.block_number != null && | ||
| response.block_hash !== constants.EMPTY_HEX && | ||
| response.result === 'SUCCESS' |
There was a problem hiding this comment.
I supposed these are changed because the linting is complaining?
There was a problem hiding this comment.
yes they are : It's not a problem here though
> null != undefined false
It won't pass the condition if null or undefined values are encountered
.husky/pre-push
Outdated
| @@ -0,0 +1 @@ | |||
| npm run build | |||
There was a problem hiding this comment.
Would it make sense to run npm run lint here instead of the full npm run build? A full build on every push might slow down the local development workflow significantly. The build check could be deferred to CI where it already runs.
There was a problem hiding this comment.
Well actually doesn't the pre-commit hook already handles linting via lint-staged for each commit? If it doesn't work should we just fix it instead of adding a new hook?
There was a problem hiding this comment.
npm run lint on pre-push would be redundant with lint-staged on pre-commit hook. But npm run build isn't the right gate either. I'm more inclined to have tsc --noEmit on pre-push hook, as currently it doesn't invoke tsc so type errors slip through and only appear in CI. We could catch those errors early without significant bottleneck on local development
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
… src/relay/lib/db/types/hbarLimiter/errors.ts Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
… rpcParamLayoutConfig.decorator.ts Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
…d-vars from BlockService.ts Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
…hiero-ledger#4792) Signed-off-by: Mariusz Jasuwienas <jasuwienas@gmail.com> Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
…iero-ledger#5140) Signed-off-by: Bartosz Solka <bartosz.solka@blockydevs.com> Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
Signed-off-by: Thomas Boot <thomas.boot@swirldslabs.com>
da73fc8 to
dd85ed6
Compare
Description
This PR strengthens the CI pipeline by adding automated lint checks and resolves all lint errors across the codebase.
1. Lint Error Resolution:
2. Eslint config:
src/andtest/folder3. CI Pipeline Enhancement
4. Husky hook
Related issue(s)
Fixes #4700
Testing Guide
npm run lintnpx tsc --noEmitnpm run buildChanges from original design (optional)
Scoped eslint config to
srcandtestfolder - seeeslint.config.mjsAdditional work needed (optional)
N/A
Checklist