From 044574cd9c8ee64bb3288e02a5efd2d32a46d9a3 Mon Sep 17 00:00:00 2001 From: rtritto Date: Tue, 1 Oct 2024 18:14:04 +0200 Subject: [PATCH] add eslint-plugin-solid --- eslint.config.mjs | 5 ++ examples/full/pages/images/+Page.tsx | 11 ++-- examples/full/pages/index/+Page.tsx | 2 +- examples/full/pages/starship/+Layout.tsx | 2 +- examples/minimal/pages/Layout.jsx | 16 ++--- package.json | 1 + packages/vike-solid/helpers/clientOnly.tsx | 2 +- .../vike-solid/integration/getPageElement.tsx | 2 +- pnpm-lock.yaml | 58 +++++++++++++++++++ 9 files changed, 82 insertions(+), 17 deletions(-) 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: