deephaven / web-client-ui

Deephaven Web Client UI
Apache License 2.0
29 stars 31 forks source link

fix: Restrict @adobe/spectrum imports #2179

Closed AkshatJawne closed 1 month ago

AkshatJawne commented 1 month ago

Closes #1908

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 46.66%. Comparing base (1d51585) to head (d5f9ad6). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2179 +/- ## ========================================== - Coverage 46.67% 46.66% -0.01% ========================================== Files 692 692 Lines 38620 38629 +9 Branches 9625 9751 +126 ========================================== + Hits 18025 18028 +3 + Misses 20584 20548 -36 - Partials 11 53 +42 ``` | [Flag](https://app.codecov.io/gh/deephaven/web-client-ui/pull/2179/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deephaven) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/deephaven/web-client-ui/pull/2179/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deephaven) | `46.66% <ø> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deephaven#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mattrunyon commented 1 month ago

This also disables the self import check from the ignored paths even if the other rules are combined. Not sure the best way around that. You might be able to combine another overrides inside of the override to turn on the rule for self imports only in those files

AkshatJawne commented 1 month ago

Not completely sure what can be done here, I have been experimenting with different configurations, but ultimately, because of the way overrides work, we can only disable the no-restricted-imports rule for a file path, not a specific import outlined in theno-restricted-imports

Gonna keep experimenting but nothing super promising so far

AkshatJawne commented 1 month ago

I believe it should be good now @mattrunyon

mattrunyon commented 1 month ago

The previous version didn't prevent importing from the owning deephaven package when in the spectrum and theme directories. It was actually preventing import a from 'packageName';