diff --git a/eslint.config.mjs b/eslint.config.mjs
index 10193d0..b9e50be 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -1,6 +1,11 @@
import tseslint from 'typescript-eslint'
+import solid from 'eslint-plugin-solid/configs/typescript'
export default tseslint.config(
+ {
+ files: ['**/*.{js,ts,jsx,tsx}'],
+ ...solid
+ },
{
ignores: ['**/dist/']
},
diff --git a/examples/full/pages/images/+Page.tsx b/examples/full/pages/images/+Page.tsx
index d7cd5cc..414d41f 100644
--- a/examples/full/pages/images/+Page.tsx
+++ b/examples/full/pages/images/+Page.tsx
@@ -25,22 +25,23 @@ function Page() {
);
}
-function Image({ src, author }: { src: string; author: string }) {
+function Image(props: { src: string; author: string }) {
return (
<>
-
+
+ />
>
);
diff --git a/examples/full/pages/index/+Page.tsx b/examples/full/pages/index/+Page.tsx
index 7232688..c05dd05 100644
--- a/examples/full/pages/index/+Page.tsx
+++ b/examples/full/pages/index/+Page.tsx
@@ -15,7 +15,7 @@ const ClientOnlyCounterSlow = clientOnly(async () => {
function Page() {
return (
<>
-
+
My Vike + Solid App
This page is:
diff --git a/examples/full/pages/starship/+Layout.tsx b/examples/full/pages/starship/+Layout.tsx
index 6c1aa0c..6e6665a 100644
--- a/examples/full/pages/starship/+Layout.tsx
+++ b/examples/full/pages/starship/+Layout.tsx
@@ -43,7 +43,7 @@ function Layout(props: FlowProps) {
}
function Link(props: any) {
- return ;
+ return ;
}
function Counter() {
diff --git a/examples/minimal/pages/Layout.jsx b/examples/minimal/pages/Layout.jsx
index 6b9df90..8abddbd 100644
--- a/examples/minimal/pages/Layout.jsx
+++ b/examples/minimal/pages/Layout.jsx
@@ -1,6 +1,6 @@
import "./Layout.css";
-export function Layout({ children }) {
+export function Layout(props) {
return (
@@ -11,12 +11,12 @@ export function Layout({ children }) {
About
- {children}
+ {props.children}
);
}
-function PageLayout({ children }) {
+function PageLayout(props) {
return (
- {children}
+ {props.children}
);
}
-function Sidebar({ children }) {
+function Sidebar(props) {
return (
- {children}
+ {props.children}
);
}
-function Content({ children }) {
+function Content(props) {
return (
- {children}
+ {props.children}
);
}
diff --git a/package.json b/package.json
index 2ab0804..5dd8ba5 100644
--- a/package.json
+++ b/package.json
@@ -35,6 +35,7 @@
"@brillout/test-types": "^0.1.15",
"@types/eslint": "^9.6.1",
"eslint": "^9.11.1",
+ "eslint-plugin-solid": "^0.14.3",
"playwright": "^1.47.2",
"typescript": "5.5.4",
"typescript-eslint": "^8.7.0"
diff --git a/packages/vike-solid/helpers/clientOnly.tsx b/packages/vike-solid/helpers/clientOnly.tsx
index b9a605b..c7b7490 100644
--- a/packages/vike-solid/helpers/clientOnly.tsx
+++ b/packages/vike-solid/helpers/clientOnly.tsx
@@ -17,7 +17,7 @@ import { isServer } from "solid-js/web";
* @see {@link https://vike.dev/clientOnly}
*/
export function clientOnly>(fn: () => Promise<{ default: T } | T>) {
- if (isServer) return (props: ComponentProps & { fallback?: JSX.Element }) => props.fallback;
+ if (isServer) return (props: ComponentProps & { fallback?: JSX.Element }) => <>{props.fallback}>;
const [comp, setComp] = createSignal();
fn().then((m) => setComp(() => ("default" in m ? m.default : m)));
diff --git a/packages/vike-solid/integration/getPageElement.tsx b/packages/vike-solid/integration/getPageElement.tsx
index 4391e77..483d55c 100644
--- a/packages/vike-solid/integration/getPageElement.tsx
+++ b/packages/vike-solid/integration/getPageElement.tsx
@@ -46,7 +46,7 @@ function Wrapper(props: { children: JSX.Element }) {
});
};
- return renderWrappers();
+ return <>{renderWrappers()}>;
}
function Page() {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8bb09bc..36d0af0 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -26,6 +26,9 @@ importers:
eslint:
specifier: ^9.11.1
version: 9.11.1(jiti@1.21.6)
+ eslint-plugin-solid:
+ specifier: ^0.14.3
+ version: 0.14.3(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)
playwright:
specifier: ^1.47.2
version: 1.47.2
@@ -1821,6 +1824,12 @@ packages:
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
engines: {node: '>=10'}
+ eslint-plugin-solid@0.14.3:
+ resolution: {integrity: sha512-eDeyPrijSjVGeyb4oKoyidgLlMDZwAg/YdxiY9QvGXl2kLgpcHvLpgpaGK4KJ8xSsg0ym3B2dPRBAIlT7iUrEQ==}
+ engines: {node: '>=18.0.0'}
+ peerDependencies:
+ eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0
+
eslint-scope@8.0.2:
resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2019,6 +2028,10 @@ packages:
html-entities@2.3.3:
resolution: {integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==}
+ html-tags@3.3.1:
+ resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==}
+ engines: {node: '>=8'}
+
human-signals@2.1.0:
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
@@ -2039,6 +2052,9 @@ packages:
resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
engines: {node: '>=0.8.19'}
+ inline-style-parser@0.2.4:
+ resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==}
+
is-arrayish@0.2.1:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
@@ -2061,6 +2077,10 @@ packages:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
engines: {node: '>=0.10.0'}
+ is-html@2.0.0:
+ resolution: {integrity: sha512-S+OpgB5i7wzIue/YSE5hg0e5ZYfG3hhpNh9KGl6ayJ38p7ED6wxQLd1TV91xHpcTvw90KMJ9EwN3F/iNflHBVg==}
+ engines: {node: '>=8'}
+
is-module@1.0.0:
resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
@@ -2151,6 +2171,9 @@ packages:
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
engines: {'0': node >= 0.2.0}
+ kebab-case@1.0.2:
+ resolution: {integrity: sha512-7n6wXq4gNgBELfDCpzKc+mRrZFs7D+wgfF5WRFLNAr4DA/qtr9Js8uOAVAfHhuLMfAcQ0pRKqbpjx+TcJVdE1Q==}
+
keyv@4.5.4:
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
@@ -2158,6 +2181,9 @@ packages:
resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}
engines: {node: '>=6'}
+ known-css-properties@0.30.0:
+ resolution: {integrity: sha512-VSWXYUnsPu9+WYKkfmJyLKtIvaRJi1kXUqVmBACORXZQxT5oZDsoZ2vQP+bQFDnWtpI/4eq3MLoRMjI2fnLzTQ==}
+
levn@0.4.1:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
@@ -2630,6 +2656,9 @@ packages:
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
engines: {node: '>=8'}
+ style-to-object@1.0.8:
+ resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==}
+
supports-color@5.5.0:
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
engines: {node: '>=4'}
@@ -4597,6 +4626,19 @@ snapshots:
escape-string-regexp@4.0.0: {}
+ eslint-plugin-solid@0.14.3(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4):
+ dependencies:
+ '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)
+ eslint: 9.11.1(jiti@1.21.6)
+ estraverse: 5.3.0
+ is-html: 2.0.0
+ kebab-case: 1.0.2
+ known-css-properties: 0.30.0
+ style-to-object: 1.0.8
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+
eslint-scope@8.0.2:
dependencies:
esrecurse: 4.3.0
@@ -4839,6 +4881,8 @@ snapshots:
html-entities@2.3.3: {}
+ html-tags@3.3.1: {}
+
human-signals@2.1.0: {}
human-signals@5.0.0: {}
@@ -4852,6 +4896,8 @@ snapshots:
imurmurhash@0.1.4: {}
+ inline-style-parser@0.2.4: {}
+
is-arrayish@0.2.1: {}
is-binary-path@2.1.0:
@@ -4870,6 +4916,10 @@ snapshots:
dependencies:
is-extglob: 2.1.1
+ is-html@2.0.0:
+ dependencies:
+ html-tags: 3.3.1
+
is-module@1.0.0: {}
is-number@7.0.0: {}
@@ -4926,12 +4976,16 @@ snapshots:
jsonparse@1.3.1: {}
+ kebab-case@1.0.2: {}
+
keyv@4.5.4:
dependencies:
json-buffer: 3.0.1
kleur@3.0.3: {}
+ known-css-properties@0.30.0: {}
+
levn@0.4.1:
dependencies:
prelude-ls: 1.2.1
@@ -5382,6 +5436,10 @@ snapshots:
strip-json-comments@3.1.1: {}
+ style-to-object@1.0.8:
+ dependencies:
+ inline-style-parser: 0.2.4
+
supports-color@5.5.0:
dependencies:
has-flag: 3.0.0