From f9c48e9ea906d5bd47e4c2d9306222851875cff9 Mon Sep 17 00:00:00 2001 From: Joel Date: Sun, 29 Sep 2024 18:27:26 +0800 Subject: [PATCH] fix: eslint to find top dir --- web/.eslintrc.json | 3 ++- web/app/(commonLayout)/plugins/page.tsx | 11 ++++++++++- web/app/components/plugins/list-item-for-test.tsx | 15 +++++++++++++++ web/tailwind.config.js | 8 +++++--- 4 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 web/app/components/plugins/list-item-for-test.tsx diff --git a/web/.eslintrc.json b/web/.eslintrc.json index 53308105b6..5194d73c63 100644 --- a/web/.eslintrc.json +++ b/web/.eslintrc.json @@ -1,4 +1,5 @@ { + "root": true, "extends": [ "next", "@antfu" @@ -27,4 +28,4 @@ "react-hooks/exhaustive-deps": "warn", "react/display-name": "warn" } -} +} \ No newline at end of file diff --git a/web/app/(commonLayout)/plugins/page.tsx b/web/app/(commonLayout)/plugins/page.tsx index c50b3ad9a2..e7a5f1d022 100644 --- a/web/app/(commonLayout)/plugins/page.tsx +++ b/web/app/(commonLayout)/plugins/page.tsx @@ -1,8 +1,17 @@ import Container from './Container' +import ListItem from '@/app/components/plugins/list-item-for-test' const PluginList = async () => { + const mockList = ['Plugin 1', 'Plugin 2', 'Plugin 3'] return ( - + <> + +
+ {mockList.map(item => ( + + ))} +
+ ) } diff --git a/web/app/components/plugins/list-item-for-test.tsx b/web/app/components/plugins/list-item-for-test.tsx new file mode 100644 index 0000000000..a0b7101f02 --- /dev/null +++ b/web/app/components/plugins/list-item-for-test.tsx @@ -0,0 +1,15 @@ +import React from 'react' + +type ListItemProps = { + text: string +} + +const ListItem: React.FC = ({ text }) => { + return ( +
+

{text}

+
+ ) +} + +export default ListItem diff --git a/web/tailwind.config.js b/web/tailwind.config.js index f92c1f7aee..a9959e7b76 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -1,6 +1,6 @@ -/** @type {import('tailwindcss').Config} */ -import commonConfig from './tailwind.common.config'; -module.exports = { +// import type { Config } from 'tailwindcss' +import commonConfig from './tailwind-common-config' +const config = { content: [ './app/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}', @@ -8,3 +8,5 @@ module.exports = { ], ...commonConfig, } + +export default config