Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce no relative package imports #2890

Merged
merged 1 commit into from
Jul 27, 2021
Merged

Conversation

dapplion
Copy link
Contributor

Motivation

Importing from relative packages in the src structure breaks packages when distributed. This rule enforces that we don't do that.

https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-relative-packages.md

Description

Enforce no relative package imports with linter

@codeclimate
Copy link

codeclimate bot commented Jul 27, 2021

Code Climate has analyzed commit 5ea9c1e and detected 0 issues on this pull request.

View more on Code Climate.

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 85aef71 Previous: ebb6ef8 Ratio
getCommitteeAssignments - req 1000 vs - 250000 vc 9.8553 ms/op 9.6139 ms/op 1.03
epoch altair - 250000 vs - 7PWei - processJustificationAndFinalization 273.53 us/op 229.93 us/op 1.19
epoch altair - 250000 vs - 7PWei - processInactivityUpdates 2.4724 s/op 2.2515 s/op 1.10
epoch altair - 250000 vs - 7PWei - processRewardsAndPenalties 1.0771 s/op 940.99 ms/op 1.14
epoch altair - 250000 vs - 7PWei - processRegistryUpdates 19.465 us/op 12.671 us/op 1.54
epoch altair - 250000 vs - 7PWei - processSlashings 69.955 us/op 53.209 us/op 1.31
epoch altair - 250000 vs - 7PWei - processEffectiveBalanceUpdates 45.212 ms/op 69.875 ms/op 0.65
epoch altair - 250000 vs - 7PWei - processParticipationFlagUpdates 290.06 ms/op 272.98 ms/op 1.06
epoch altair - 250000 vs - 7PWei - prepareEpochProcessState 605.70 ms/op 548.44 ms/op 1.10
Process block - 250000 vs - 7PWei - with 0 validator exit 427.88 us/op 394.81 us/op 1.08
Process block - 250000 vs - 7PWei - with 1 validator exit 35.674 ms/op 33.377 ms/op 1.07
Process block - 250000 vs - 7PWei - with 16 validator exits 23.509 ms/op 24.469 ms/op 0.96
epoch phase0 - 250000 vs - 7PWei - processJustificationAndFinalization 115.64 us/op 117.04 us/op 0.99
epoch phase0 - 250000 vs - 7PWei - processRewardsAndPenalties 662.85 ms/op 537.36 ms/op 1.23
epoch phase0 - 250000 vs - 7PWei - processRegistryUpdates 17.677 us/op 15.204 us/op 1.16
epoch phase0 - 250000 vs - 7PWei - processSlashings 41.951 us/op 53.259 us/op 0.79
epoch phase0 - 250000 vs - 7PWei - processFinalUpdates 46.306 ms/op 44.352 ms/op 1.04
epoch phase0 - 250000 vs - 7PWei - prepareEpochProcessState 1.1872 s/op 1.0400 s/op 1.14
getAttestationDeltas - 250000 vs - 7PWei 95.811 ms/op 88.945 ms/op 1.08
processSlots - 250000 vs - 7PWei - 32 empty slots 6.8107 s/op 5.9673 s/op 1.14
shuffle list - 16384 els 1.9965 ms/op 3.6185 ms/op 0.55
shuffle list - 250000 els 28.850 ms/op 30.888 ms/op 0.93
getPubkeys - persistent - req 1000 vs - 250000 vc 19.715 us/op 19.775 us/op 1.00
BLS verify - blst-native 2.2224 ms/op 2.2196 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 4.5138 ms/op 4.5387 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst-native 9.7985 ms/op 9.7287 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 38.322 ms/op 37.258 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 48.397 us/op 46.620 us/op 1.04
BLS aggregatePubkeys 128 - blst-native 186.08 us/op 179.84 us/op 1.03
getAttestationsForBlock 114.22 ms/op 110.15 ms/op 1.04
validate gossip signedAggregateAndProof - struct 6.9020 ms/op 6.0122 ms/op 1.15
validate gossip signedAggregateAndProof - treeBacked 5.3496 ms/op 5.0107 ms/op 1.07
validate gossip attestation - struct 2.5058 ms/op 2.3800 ms/op 1.05
validate gossip attestation - treeBacked 2.5621 ms/op 2.3941 ms/op 1.07

by benchmarkbot/action

Copy link
Contributor

@twoeths twoeths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 it's so useful to have this rule

@dapplion dapplion merged commit 6b8ade0 into master Jul 27, 2021
@dapplion dapplion deleted the dapplion/relative-imports branch July 27, 2021 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants