Skip to content

Commit 509727f

Browse files
committed
code review
1 parent d7e0392 commit 509727f

19 files changed

+67
-74
lines changed

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# lint and format staged files
2-
32
pnpm dlx lint-staged
43

54
# verify typescript staged files

CONTRIBUTING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ Commits should be signed. You can read more about [Commit Signing][] here.
181181

182182
This project uses [Husky][] for Git pre-commit hooks.
183183

184-
- Some JSON files are generated during Build time with empty files as placeholders. Build time happens when you run `pnpm serve` or `pnpm build`.
185-
- We don't want to commit those unnecessary changes. Since these files exist in the repository, `.gitignore` won't work for them. As a workaround, we have a pre-commit hook to discard those changes.
186-
187184
## Pull Request Policy
188185

189186
This policy governs how contributions should land within this repository. The lines below state the checks and policies to be followed before merging and in the act of merging.

apps/site/hooks/react-client/useClientContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import { useContext } from 'react';
44

5-
import { MatterContext } from '../../providers/matterProvider';
6-
import type { ClientSharedServerContext } from '../../types';
5+
import { MatterContext } from '@/providers/matterProvider';
6+
import type { ClientSharedServerContext } from '@/types';
77

88
const useClientContext = (): ClientSharedServerContext => {
99
const {

apps/site/hooks/react-client/useDetectOS.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import { useEffect, useState } from 'react';
44

5-
import type { UserArchitecture, UserBitness, UserOS } from '../../types/userOS';
6-
import { detectOS } from '../../util/detectOS';
7-
import { getHighEntropyValues } from '../../util/getHighEntropyValues';
5+
import type { UserArchitecture, UserBitness, UserOS } from '@/types/userOS';
6+
import { detectOS } from '@/util/detectOS';
7+
import { getHighEntropyValues } from '@/util/getHighEntropyValues';
88

99
type UserOSState = {
1010
os: UserOS | 'LOADING';

apps/site/hooks/react-client/useNavigationState.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import type { RefObject } from 'react';
44
import { useContext, useEffect } from 'react';
55

6-
import { NavigationStateContext } from '../../providers/navigationStateProvider';
7-
import { debounce } from '../../util/debounce';
6+
import { NavigationStateContext } from '@/providers/navigationStateProvider';
7+
import { debounce } from '@/util/debounce';
88

99
const useNavigationState = <T extends HTMLElement>(
1010
id: string,

apps/site/hooks/react-client/useNotification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useContext } from 'react';
44

5-
import { NotificationDispatch } from '../../providers/notificationProvider';
5+
import { NotificationDispatch } from '@/providers/notificationProvider';
66

77
const useNotification = () => useContext(NotificationDispatch);
88

apps/site/hooks/react-generic/useSiteNavigation.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import type { RichTranslationValues } from 'next-intl';
22
import { useTranslations } from 'next-intl';
33
import type { HTMLAttributeAnchorTarget } from 'react';
44

5+
import { siteNavigation } from '@/next.json.mjs';
56
import type {
67
FormattedMessage,
78
NavigationEntry,
89
NavigationKeys,
910
} from '@/types';
1011

11-
import { siteNavigation } from '../../next.json.mjs';
12-
1312
type Context = Record<string, RichTranslationValues>;
1413
type Navigation = Record<string, NavigationEntry>;
1514

apps/site/package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,16 @@
2020
"test:unit": "cross-env NODE_NO_WARNINGS=1 node --experimental-test-coverage --test-coverage-exclude=**/*.test.* --experimental-test-module-mocks --enable-source-maps --import=global-jsdom/register --import=tsx --import=tests/setup.jsx --test **/*.test.*",
2121
"test:unit:watch": "cross-env NODE_OPTIONS=\"--watch\" pnpm test:unit"
2222
},
23-
"peerDependencies": {
24-
"@opentelemetry/api-logs": "~0.200.0",
25-
"@opentelemetry/instrumentation": "~0.200.0",
26-
"@opentelemetry/resources": "~1.30.1",
27-
"@opentelemetry/sdk-logs": "~0.200.0"
28-
},
2923
"dependencies": {
3024
"@heroicons/react": "~2.2.0",
3125
"@mdx-js/mdx": "^3.1.0",
3226
"@node-core/ui-components": "workspace:*",
3327
"@node-core/website-i18n": "workspace:*",
3428
"@nodevu/core": "0.3.0",
29+
"@opentelemetry/api-logs": "~0.200.0",
30+
"@opentelemetry/instrumentation": "~0.200.0",
31+
"@opentelemetry/resources": "~1.30.1",
32+
"@opentelemetry/sdk-logs": "~0.200.0",
3533
"@orama/react-components": "^0.6.4",
3634
"@oramacloud/client": "^2.1.4",
3735
"@radix-ui/react-slot": "^1.1.2",
@@ -108,7 +106,7 @@
108106
"tsx": "^4.19.3",
109107
"typescript": "~5.8.2",
110108
"typescript-eslint": "~8.29.0",
111-
"unified": "11.0.5",
109+
"unified": "^11.0.5",
112110
"user-agent-data-types": "0.4.2"
113111
}
114112
}

apps/site/providers/matterProvider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import { createContext } from 'react';
44
import type { FC, PropsWithChildren } from 'react';
55

6-
import { useDetectOS } from '../hooks';
7-
import type { ClientSharedServerContext } from '../types';
8-
import { assignClientContext } from '../util/assignClientContext';
6+
import { useDetectOS } from '@/hooks';
7+
import type { ClientSharedServerContext } from '@/types';
8+
import { assignClientContext } from '@/util/assignClientContext';
99

1010
export const MatterContext = createContext<ClientSharedServerContext>(
1111
assignClientContext({})

apps/site/providers/releaseProvider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import {
99
useReducer,
1010
} from 'react';
1111

12-
import reducer, { getActions, releaseState } from '../reducers/releaseReducer';
13-
import type { NodeRelease } from '../types';
14-
import type * as Types from '../types/release';
12+
import reducer, { getActions, releaseState } from '@/reducers/releaseReducer';
13+
import type { NodeRelease } from '@/types';
14+
import type * as Types from '@/types/release';
1515

1616
export const ReleasesContext = createContext<Types.ReleasesContextType>({
1717
releases: [],

0 commit comments

Comments
 (0)