fix: eslint to find top dir

This commit is contained in:
Joel 2024-09-29 18:27:26 +08:00
parent 3b48f8c98e
commit f9c48e9ea9
4 changed files with 32 additions and 5 deletions

View File

@ -1,4 +1,5 @@
{
"root": true,
"extends": [
"next",
"@antfu"

View File

@ -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 (
<>
<Container />
<div>
{mockList.map(item => (
<ListItem key={item} text={item} />
))}
</div>
</>
)
}

View File

@ -0,0 +1,15 @@
import React from 'react'
type ListItemProps = {
text: string
}
const ListItem: React.FC<ListItemProps> = ({ text }) => {
return (
<div>
<p>{text}</p>
</div>
)
}
export default ListItem

View File

@ -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