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

Prevent import from '.' #1960

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Prevent import from '.' #1960

merged 1 commit into from
Feb 15, 2024

Conversation

david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Feb 15, 2024

@charliepark ran into a very confusing circular import issue in #1957 due to importing from '.', which made me realize we should just disallow that entirely. The rule worked exactly as I hoped. Here's the output before I fixed the imports:

Screenshot 2024-02-14 at 9 03 00 PM

Copy link

vercel bot commented Feb 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Feb 15, 2024 3:07am

export const apiQueryClient = wrapQueryClient(api.methods, queryClient)

// to be used to retrieve the typed query client in components
export const useApiQueryClient = getUseApiQueryClient(api.methods)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

had to move this all to its own file to do import { usePrefetchedApiQuery } from './client' in roles.ts

@david-crespo david-crespo enabled auto-merge (squash) February 15, 2024 03:10
@david-crespo david-crespo merged commit f8d2f36 into main Feb 15, 2024
8 checks passed
@david-crespo david-crespo deleted the restrict-dot-import branch February 15, 2024 03:14
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Feb 23, 2024
oxidecomputer/console@e5a1f80...80f1167

* [80f11673](oxidecomputer/console@80f11673) oxidecomputer/console#1957
* [5d989a70](oxidecomputer/console@5d989a70) oxidecomputer/console#1959
* [d4ec1927](oxidecomputer/console@d4ec1927) turn off license-eye comments, I hate them. CI failure is sufficient
* [f8d2f36e](oxidecomputer/console@f8d2f36e) oxidecomputer/console#1960
* [e0b676dc](oxidecomputer/console@e0b676dc) upgrade husky commands for v9 https://github.com/typicode/husky/releases/tag/v9.0.1
* [f31d5331](oxidecomputer/console@f31d5331) oxidecomputer/console#1944
* [b4552eea](oxidecomputer/console@b4552eea) Revert "Revert all app changes since v6 except two small fixes (oxidecomputer/console#1958)"
* [1f8ebf28](oxidecomputer/console@1f8ebf28) oxidecomputer/console#1958
* [b454cefd](oxidecomputer/console@b454cefd) oxidecomputer/console#1955
* [1ce32d32](oxidecomputer/console@1ce32d32) oxidecomputer/console#1956
* [794ae11d](oxidecomputer/console@794ae11d) oxidecomputer/console#1952
* [903b8f6a](oxidecomputer/console@903b8f6a) tweak api-diff: fix type error on first arg, use dax's new built-in pipe
* [a4e15cdd](oxidecomputer/console@a4e15cdd) oxidecomputer/console#1950
* [32037d40](oxidecomputer/console@32037d40) oxidecomputer/console#1949
* [f02678b0](oxidecomputer/console@f02678b0) vite 5.1
* [1936e0d8](oxidecomputer/console@1936e0d8) oxidecomputer/console#1948
* [cfda1636](oxidecomputer/console@cfda1636) forgot to bump mockServiceWorker.js (no actual changes)
* [4792105e](oxidecomputer/console@4792105e) oxidecomputer/console#1943
* [a26db9ea](oxidecomputer/console@a26db9ea) upgrade date-fns thru major version, update calls accordingly
* [3dd635a6](oxidecomputer/console@3dd635a6) oxidecomputer/console#1933
* [6c8f7a9c](oxidecomputer/console@6c8f7a9c) upgrade filesize through a major version
* [8f641b97](oxidecomputer/console@8f641b97) remove blathering in readme about node 16, which is EOL
* [e9d157a1](oxidecomputer/console@e9d157a1) do ladle too—oh my god why does it have 3000 lines in the lockfile
* [e1cdcc13](oxidecomputer/console@e1cdcc13) oxidecomputer/console#1941
* [76877ffb](oxidecomputer/console@76877ffb) oxidecomputer/console#1938
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Feb 26, 2024
### User-facing changes

* [80f11673](oxidecomputer/console@80f11673)
oxidecomputer/console#1957
* [f31d5331](oxidecomputer/console@f31d5331)
oxidecomputer/console#1944
* [b454cefd](oxidecomputer/console@b454cefd)
oxidecomputer/console#1955
* [1936e0d8](oxidecomputer/console@1936e0d8)
oxidecomputer/console#1948

---

### All changes

oxidecomputer/console@e5a1f80...80f1167

* [80f11673](oxidecomputer/console@80f11673)
oxidecomputer/console#1957
* [5d989a70](oxidecomputer/console@5d989a70)
oxidecomputer/console#1959
* [d4ec1927](oxidecomputer/console@d4ec1927)
turn off license-eye comments, I hate them. CI failure is sufficient
* [f8d2f36e](oxidecomputer/console@f8d2f36e)
oxidecomputer/console#1960
* [e0b676dc](oxidecomputer/console@e0b676dc)
upgrade husky commands for v9
https://github.com/typicode/husky/releases/tag/v9.0.1
* [f31d5331](oxidecomputer/console@f31d5331)
oxidecomputer/console#1944
* [b4552eea](oxidecomputer/console@b4552eea)
Revert "Revert all app changes since v6 except two small fixes
(oxidecomputer/console#1958)"
* [1f8ebf28](oxidecomputer/console@1f8ebf28)
oxidecomputer/console#1958
* [b454cefd](oxidecomputer/console@b454cefd)
oxidecomputer/console#1955
* [1ce32d32](oxidecomputer/console@1ce32d32)
oxidecomputer/console#1956
* [794ae11d](oxidecomputer/console@794ae11d)
oxidecomputer/console#1952
* [903b8f6a](oxidecomputer/console@903b8f6a)
tweak api-diff: fix type error on first arg, use dax's new built-in pipe
* [a4e15cdd](oxidecomputer/console@a4e15cdd)
oxidecomputer/console#1950
* [32037d40](oxidecomputer/console@32037d40)
oxidecomputer/console#1949
* [f02678b0](oxidecomputer/console@f02678b0)
vite 5.1
* [1936e0d8](oxidecomputer/console@1936e0d8)
oxidecomputer/console#1948
* [cfda1636](oxidecomputer/console@cfda1636)
forgot to bump mockServiceWorker.js (no actual changes)
* [4792105e](oxidecomputer/console@4792105e)
oxidecomputer/console#1943
* [a26db9ea](oxidecomputer/console@a26db9ea)
upgrade date-fns thru major version, update calls accordingly
* [3dd635a6](oxidecomputer/console@3dd635a6)
oxidecomputer/console#1933
* [6c8f7a9c](oxidecomputer/console@6c8f7a9c)
upgrade filesize through a major version
* [8f641b97](oxidecomputer/console@8f641b97)
remove blathering in readme about node 16, which is EOL
* [e9d157a1](oxidecomputer/console@e9d157a1)
do ladle too—oh my god why does it have 3000 lines in the lockfile
* [e1cdcc13](oxidecomputer/console@e1cdcc13)
oxidecomputer/console#1941
* [76877ffb](oxidecomputer/console@76877ffb)
oxidecomputer/console#1938
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.

1 participant