Skip to content

Commit 15b3f3e

Browse files
authored
fix: ignore node/ directory in ESLint config (#1024)
* fix: ignore node/ directory in ESLint config The `node/` directory contains a checkout of the Node.js source tree whose own `eslint.config.mjs` references files that don't exist in this repo (e.g. `benchmark/eslint.config_partial.mjs`). Add it to the `ignores` list so `node --run lint` doesn't fail. * fix: lint warn
1 parent 27a412a commit 15b3f3e

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default defineConfig([
1313
ignores: [
1414
'www/out',
1515
'out/',
16+
'node/',
1617
'packages/node/src/api-links/__tests__/fixtures/',
1718
],
1819
},

packages/react/src/html/ui/hooks/useOrama.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ export default pathname => {
1414
const loaded = useRef(null);
1515

1616
useEffect(() => {
17+
// Reset loaded state when pathname changes
18+
loaded.current = null;
19+
1720
// Create the database instance
1821
const db = create({
1922
schema: {},
@@ -45,8 +48,8 @@ export default pathname => {
4548
return search(db, options);
4649
};
4750

48-
setClient(db);
49-
}, []);
51+
queueMicrotask(() => setClient(db));
52+
}, [pathname]);
5053

5154
return client;
5255
};

packages/react/src/html/ui/islands/withIsland.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export default (Component, { name, on }) => {
4848

4949
<Component {...props}>
5050
{toChildArray(children).map((child, index) => (
51+
// eslint-disable-next-line react-x/no-array-index-key -- static server-rendered children never reorder
5152
<island-slot defer-hydration key={index}>
5253
{child}
5354
</island-slot>

0 commit comments

Comments
 (0)