diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 15621ba..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = {
- extends: [require.resolve('@umijs/fabric/dist/eslint')],
- rules: {
- 'default-case': 0,
- 'import/no-extraneous-dependencies': 0,
- 'react-hooks/exhaustive-deps': 0,
- 'react/no-find-dom-node': 0,
- 'react/no-did-update-set-state': 0,
- 'react/no-unused-state': 1,
- 'react/sort-comp': 0,
- 'jsx-a11y/label-has-for': 0,
- 'jsx-a11y/label-has-associated-control': 0,
- '@typescript-eslint/consistent-indexed-object-style': 0,
- '@typescript-eslint/no-parameter-properties': 0,
- '@typescript-eslint/ban-types': 0,
- '@typescript-eslint/type-annotation-spacing': 0,
- '@typescript-eslint/no-throw-literal': 0,
- },
-};
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 33b1999..758659a 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,15 +1,2 @@
-# These are supported funding model platforms
-
-github: ant-design # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
-patreon: # Replace with a single Patreon username
-open_collective: ant-design # Replace with a single Open Collective username
-ko_fi: # Replace with a single Ko-fi username
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: # Replace with a single Liberapay username
-issuehunt: # Replace with a single IssueHunt username
-lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
-polar: # Replace with a single Polar username
-buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
-thanks_dev: # Replace with a single thanks.dev username
-custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+github: ant-design
+open_collective: ant-design
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index dcc7623..5e6c7fa 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -3,28 +3,25 @@ updates:
- package-ecosystem: npm
directory: '/'
schedule:
- interval: daily
+ interval: weekly
+ day: monday
time: '21:00'
+ timezone: Asia/Shanghai
open-pull-requests-limit: 10
- ignore:
- - dependency-name: np
- versions:
- - 7.2.0
- - 7.3.0
- - 7.4.0
- - dependency-name: '@types/react-dom'
- versions:
- - 17.0.0
- - 17.0.1
- - 17.0.2
- - dependency-name: '@types/react'
- versions:
- - 17.0.0
- - 17.0.1
- - 17.0.2
- - 17.0.3
- - dependency-name: typescript
- versions:
- - 4.1.3
- - 4.1.4
- - 4.1.5
+ groups:
+ npm-dependencies:
+ patterns:
+ - '*'
+
+ - package-ecosystem: github-actions
+ directory: '/'
+ schedule:
+ interval: weekly
+ day: monday
+ time: '21:00'
+ timezone: Asia/Shanghai
+ open-pull-requests-limit: 10
+ groups:
+ github-actions:
+ patterns:
+ - '*'
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index d7208a4..6082fc6 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -6,7 +6,7 @@ on:
pull_request:
branches: ['master']
schedule:
- - cron: '40 12 * * 0'
+ - cron: '36 13 * * 3'
jobs:
analyze:
@@ -20,22 +20,24 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [javascript]
+ language: [javascript-typescript]
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
with:
category: '/language:${{ matrix.language }}'
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index f860ff1..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-name: ✅ test
-on: [push, pull_request]
-jobs:
- test:
- uses: react-component/rc-test/.github/workflows/test.yml@main
- secrets: inherit
diff --git a/.github/workflows/react-doctor.yml b/.github/workflows/react-doctor.yml
new file mode 100644
index 0000000..29d6f76
--- /dev/null
+++ b/.github/workflows/react-doctor.yml
@@ -0,0 +1,22 @@
+name: React Doctor
+
+on:
+ pull_request:
+ push:
+ branches: [master]
+
+permissions:
+ contents: read
+ pull-requests: write
+ issues: write
+ statuses: write
+
+jobs:
+ react-doctor:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ fetch-depth: 0
+ persist-credentials: false
+ - uses: millionco/react-doctor@0b4f4f4bd248a154e64eb508a48347f71154b3f3
diff --git a/.github/workflows/surge-preview.yml b/.github/workflows/surge-preview.yml
new file mode 100644
index 0000000..ba9f1dd
--- /dev/null
+++ b/.github/workflows/surge-preview.yml
@@ -0,0 +1,52 @@
+name: Surge Preview
+
+on:
+ pull_request:
+
+permissions:
+ contents: read
+ pull-requests: write
+ checks: write
+
+jobs:
+ preview:
+ runs-on: ubuntu-latest
+ concurrency:
+ group: surge-preview-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: Check Surge token
+ id: surge-token
+ env:
+ SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
+ run: |
+ if [ -n "$SURGE_TOKEN" ]; then
+ echo "enabled=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "enabled=false" >> "$GITHUB_OUTPUT"
+ fi
+ - name: Setup utoo
+ if: ${{ steps.surge-token.outputs.enabled == 'true' }}
+ uses: utooland/setup-utoo@v1
+
+ - name: Build preview
+ if: ${{ steps.surge-token.outputs.enabled == 'true' }}
+ run: |
+ ut install
+ npm run build
+ - uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
+ if: ${{ steps.surge-token.outputs.enabled == 'true' }}
+ env:
+ SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
+ with:
+ surge_token: ${{ env.SURGE_TOKEN }}
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ dist: docs-dist
+ failOnError: false
+ setCommitStatus: false
+ - name: Skip Surge preview
+ if: ${{ steps.surge-token.outputs.enabled != 'true' }}
+ run: echo "SURGE_TOKEN is not configured; skip Surge preview."
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..10c0ebb
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,16 @@
+name: ✅ test
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
+ secrets:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/README.md b/README.md
index e44bd05..5196fc5 100644
--- a/README.md
+++ b/README.md
@@ -1,50 +1,43 @@
-# @rc-component/Listy
-
-React Listy Component
-
-[![NPM version][npm-image]][npm-url]
-[![npm download][download-image]][download-url]
-[![build status][github-actions-image]][github-actions-url]
-[![Test coverage][codecov-image]][codecov-url]
-[![bundle size][bundlephobia-image]][bundlephobia-url]
-[![dumi][dumi-image]][dumi-url]
-
-[npm-image]: http://img.shields.io/npm/v/@rc-component/listy.svg?style=flat-square
-[npm-url]: http://npmjs.org/package/@rc-component/listy
-[github-actions-image]: https://github.com/react-component/listy/workflows/CI/badge.svg
-[github-actions-url]: https://github.com/react-component/listy/actions
-[codecov-image]: https://img.shields.io/codecov/c/github/react-component/listy/master.svg?style=flat-square
-[codecov-url]: https://codecov.io/gh/react-component/listy/branch/master
-[david-url]: https://david-dm.org/react-component/listy
-[david-image]: https://david-dm.org/react-component/listy/status.svg?style=flat-square
-[david-dev-url]: https://david-dm.org/react-component/listy?type=dev
-[david-dev-image]: https://david-dm.org/react-component/listy/dev-status.svg?style=flat-square
-[download-image]: https://img.shields.io/npm/dm/@rc-component/listy.svg?style=flat-square
-[download-url]: https://npmjs.org/package/@rc-component/listy
-[bundlephobia-url]: https://bundlephobia.com/result?p=@rc-component/listy
-[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@rc-component/listy
-[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square
-[dumi-url]: https://github.com/umijs/dumi
+
+
@rc-component/listy
+
Part of the Ant Design ecosystem.
+
📜 Virtualized React list component with grouping and sticky header support.
+
+
+
+
+
+
+
+
+
+
+
+English | 简体中文
+
+## Highlights
+
+| Area | Support |
+| --- | --- |
+| Purpose | Virtualized React list component with grouping and sticky header support. |
+| Package | `@rc-component/listy` |
+| Release | `@rc-component/np` / `rc-np` |
## Install
-[](https://npmjs.org/package/@rc-component/listy)
+```bash
+npm install @rc-component/listy
+```
## Usage
-Include the default [styling](https://github.com/react-component/listy/blob/master/assets/index.less#L4:L11) and then:
-
-```js
-import React from 'react';
-import ReactDOM from 'react-dom/client';
+```tsx | pure
import Listy from '@rc-component/listy';
+import '@rc-component/listy/assets/index.css';
-const items = Array.from({ length: 100 }, (_, index) => ({
- id: index,
- name: `Item ${index}`,
-}));
+const items = Array.from({ length: 100 }, (_, index) => ({ id: index, name: `Item ${index}` }));
-const App = () => (
+export default () => (
(
itemRender={(item) => {item.name}
}
/>
);
-
-ReactDOM.createRoot(container).render();
```
-## Compatibility
+## API
-| [
](http://godban.github.io/browsers-support-badges/)
IE / Edge | [
](http://godban.github.io/browsers-support-badges/)
Firefox | [
](http://godban.github.io/browsers-support-badges/)
Chrome | [
](http://godban.github.io/browsers-support-badges/)
Safari | [
](http://godban.github.io/browsers-support-badges/)
Electron |
-| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
+| Prop | Description | Type | Default |
+| --- | --- | --- | --- |
+| `items` | List data source. | `T[]` | `[]` |
+| `rowKey` | Resolve item identity. | `keyof T \| (item: T) => React.Key` | required |
+| `itemRender` | Render each item. | `(item: T, index: number) => React.ReactNode` | required |
+| `height` | Viewport height. | `number` | - |
+| `itemHeight` | Estimated item height. | `number` | - |
+| `group` | Group configuration. | `{ key: (item: T) => K; title: (groupKey: K, items: T[]) => React.ReactNode }` | - |
+| `sticky` | Enable sticky group headers. | `boolean` | `false` |
+| `virtual` | Enable virtual scrolling. | `boolean` | `true` |
+| `onScroll` | Triggered when the inner scroll container scrolls. | `React.UIEventHandler` | - |
+| `prefixCls` | Component class name prefix. | `string` | `rc-listy` |
-## Example
+### ListyRef
-http://localhost:9001
+| Method | Description |
+| --- | --- |
+| `scrollTo(config)` | Scroll to a position, item key, or group key. |
## Development
-```
+```bash
npm install
npm start
+npm test
+npm run lint
+npm run compile
```
-## API
+The dumi site runs at `http://localhost:8000`.
-### props
+## Release
-| name | type | default | description |
-| --- | --- | --- | --- |
-| items | `T[]` | `[]` | 列表数据源,虚拟滚动会基于此计算高度。 |
-| rowKey | `keyof T \| (item: T) => React.Key` | required | 返回每一项的唯一标识,用于缓存高度与滚动定位。 |
-| itemRender | `(item: T, index: number) => React.ReactNode` | required | 渲染单行内容的函数。 |
-| height | `number` | - | 列表可视区域高度。 |
-| itemHeight | `number` | - | 每行的基础高度,虚拟滚动会以此做初始估算。 |
-| group | `{ key: ((item: T) => K) \| K; title: (groupKey: K, items: T[]) => React.ReactNode }` | - | 提供分组 key 与标题渲染,开启后会生成组头。 |
-| sticky | `boolean` | `false` | 为分组头启用粘性悬停效果。 |
-| virtual | `boolean` | `true` | 是否启用虚拟列表模式,可根据需要关闭。 |
-| onScroll | `React.UIEventHandler` | - | 滚动时触发,透传内部滚动容器的滚动事件。 |
-| prefixCls | `string` | `rc-listy` | 组件样式前缀,方便自定义样式隔离。 |
-
-### ListyRef
-
-- `scrollTo(config?: number | null | { left?: number; top?: number } | { key: React.Key; align?: 'top' | 'bottom' | 'auto'; offset?: number } | { groupKey: React.Key; align?: 'top' | 'bottom' | 'auto'; offset?: number })`
- - 传入 `groupKey` 时会直接滚动到对应组头(需启用 `group`)
-
-## Test Case
-
-```
-npm test
-npm run coverage
+```bash
+npm run prepublishOnly
```
-open coverage/ dir
+The release flow is handled by `@rc-component/np` through the `rc-np` command when the package uses the shared release flow.
## License
-@rc-component/listy is released under the MIT license.
+@rc-component/listy is released under the [MIT](./LICENSE) license.
diff --git a/README.zh-CN.md b/README.zh-CN.md
new file mode 100644
index 0000000..8e274b6
--- /dev/null
+++ b/README.zh-CN.md
@@ -0,0 +1,94 @@
+
+
@rc-component/listy
+
Ant Design 生态的一部分。
+
📜 支持虚拟滚动、分组与粘性组头的 React 列表组件。
+
+
+
+
+
+
+
+
+
+
+
+English | 简体中文
+
+## 亮点
+
+| 方向 | 支持 |
+| --- | --- |
+| 定位 | 支持虚拟滚动、分组与粘性组头的 React 列表组件。 |
+| 包名 | `@rc-component/listy` |
+| 发布 | `@rc-component/np` / `rc-np` |
+
+## 安装
+
+```bash
+npm install @rc-component/listy
+```
+
+## 用法
+
+```tsx | pure
+import Listy from '@rc-component/listy';
+import '@rc-component/listy/assets/index.css';
+
+const items = Array.from({ length: 100 }, (_, index) => ({ id: index, name: `Item ${index}` }));
+
+export default () => (
+ {item.name}
}
+ />
+);
+```
+
+## API
+
+| 名称 | 说明 | 类型 | 默认值 |
+| --- | --- | --- | --- |
+| `items` | 列表数据源。 | `T[]` | `[]` |
+| `rowKey` | 解析列表项唯一标识。 | `keyof T \| (item: T) => React.Key` | 必填 |
+| `itemRender` | 渲染每一项。 | `(item: T, index: number) => React.ReactNode` | 必填 |
+| `height` | 可视区域高度。 | `number` | - |
+| `itemHeight` | 预估项高度。 | `number` | - |
+| `group` | 分组配置。 | `{ key: (item: T) => K; title: (groupKey: K, items: T[]) => React.ReactNode }` | - |
+| `sticky` | 启用粘性组头。 | `boolean` | `false` |
+| `virtual` | 启用虚拟滚动。 | `boolean` | `true` |
+| `onScroll` | 内部滚动容器滚动时触发。 | `React.UIEventHandler` | - |
+| `prefixCls` | 组件样式前缀。 | `string` | `rc-listy` |
+
+### ListyRef
+
+| 方法 | 说明 |
+| --- | --- |
+| `scrollTo(config)` | 滚动到指定位置、列表项 key 或分组 key。 |
+
+## 本地开发
+
+```bash
+npm install
+npm start
+npm test
+npm run lint
+npm run compile
+```
+
+本地 dumi 站点默认运行在 `http://localhost:8000`.
+
+## 发布
+
+```bash
+npm run prepublishOnly
+```
+
+发布流程通过 `@rc-component/np` 提供的 `rc-np` 命令处理。
+
+## 许可证
+
+@rc-component/listy 基于 [MIT](./LICENSE) 协议发布。
diff --git a/eslint.config.mjs b/eslint.config.mjs
new file mode 100644
index 0000000..40f08ec
--- /dev/null
+++ b/eslint.config.mjs
@@ -0,0 +1,115 @@
+import js from '@eslint/js';
+import { defineConfig } from 'eslint/config';
+import { dirname } from 'node:path';
+import { fileURLToPath } from 'node:url';
+import prettier from 'eslint-config-prettier';
+import jest from 'eslint-plugin-jest';
+import react from 'eslint-plugin-react';
+import reactHooks from 'eslint-plugin-react-hooks';
+import globals from 'globals';
+import tseslint from 'typescript-eslint';
+
+const tsconfigRootDir = dirname(fileURLToPath(import.meta.url));
+
+export default defineConfig([
+ {
+ plugins: {
+ '@typescript-eslint': tseslint.plugin,
+ },
+ },
+ {
+ linterOptions: {
+ reportUnusedDisableDirectives: 'warn',
+ },
+ },
+ {
+ ignores: [
+ 'node_modules/',
+ 'coverage/',
+ 'es/',
+ 'lib/',
+ 'dist/',
+ 'docs-dist/',
+ '.docs-dist/',
+ '.dumi/',
+ '.doc/',
+ '.vercel/',
+ ],
+ },
+ {
+ files: ['**/*.{js,jsx,ts,tsx}'],
+ extends: [
+ js.configs.recommended,
+ react.configs.flat.recommended,
+ react.configs.flat['jsx-runtime'],
+ prettier,
+ ],
+ plugins: {
+ 'react-hooks': reactHooks,
+ },
+ languageOptions: {
+ globals: {
+ ...globals.browser,
+ ...globals.node,
+ },
+ },
+ settings: {
+ react: {
+ version: 'detect',
+ },
+ },
+ rules: {
+ 'no-async-promise-executor': 'off',
+ 'no-empty-pattern': 'off',
+ 'no-irregular-whitespace': 'off',
+ 'no-prototype-builtins': 'off',
+ 'no-useless-escape': 'off',
+ 'no-extra-boolean-cast': 'off',
+ 'no-undef': 'off',
+ 'no-unused-vars': 'off',
+ 'react/no-find-dom-node': 'off',
+ 'react/display-name': 'off',
+ 'react/no-unknown-property': 'off',
+ 'react/prop-types': 'off',
+ 'react-hooks/exhaustive-deps': 'warn',
+ 'react-hooks/rules-of-hooks': 'error',
+ },
+ },
+ {
+ files: ['**/*.{ts,tsx}'],
+ extends: [...tseslint.configs.recommended],
+ rules: {
+ '@typescript-eslint/ban-ts-comment': 'off',
+ '@typescript-eslint/no-empty-object-type': 'off',
+ '@typescript-eslint/no-explicit-any': 'off',
+ '@typescript-eslint/no-unsafe-function-type': 'off',
+ '@typescript-eslint/no-unnecessary-type-constraint': 'off',
+ '@typescript-eslint/no-unused-vars': 'off',
+ },
+ },
+ {
+ files: ['src/**/*.{ts,tsx}'],
+ languageOptions: {
+ parserOptions: {
+ projectService: true,
+ tsconfigRootDir,
+ },
+ },
+ },
+ {
+ files: ['tests/**/*.{js,jsx,ts,tsx}', '**/*.{test,spec}.{js,jsx,ts,tsx}'],
+ extends: [jest.configs['flat/recommended']],
+ rules: {
+ 'jest/no-disabled-tests': 'off',
+ 'jest/no-done-callback': 'off',
+ 'jest/no-identical-title': 'off',
+ 'jest/expect-expect': 'off',
+ 'jest/no-alias-methods': 'off',
+ 'jest/no-conditional-expect': 'off',
+ 'jest/no-export': 'off',
+ 'jest/no-standalone-expect': 'off',
+ 'jest/valid-expect': 'off',
+ 'jest/valid-title': 'off',
+ },
+ },
+]);
diff --git a/package.json b/package.json
index 1bfafcd..55ddb19 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@rc-component/listy",
"version": "1.2.1",
- "description": "React Listy Component",
+ "description": "📜 Virtualized React list component with grouping and sticky header support.",
"keywords": [
"react",
"react-component",
@@ -35,8 +35,7 @@
"lint": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js",
"test": "rc-test",
"prettier": "prettier --write .",
- "coverage": "rc-test --coverage",
- "now-build": "npm run build"
+ "coverage": "rc-test --coverage"
},
"dependencies": {
"@rc-component/motion": "^1.1.4",
@@ -47,27 +46,33 @@
"@rc-component/virtual-list": "^1.2.0"
},
"devDependencies": {
- "@rc-component/father-plugin": "^2.1.3",
+ "@eslint/js": "^9.39.4",
+ "@rc-component/father-plugin": "^2.2.0",
"@rc-component/np": "^1.0.4",
"@testing-library/jest-dom": "^6.9.1",
- "@testing-library/react": "^16.3.0",
+ "@testing-library/react": "^16.3.2",
"@types/classnames": "^2.3.4",
"@types/jest": "^30.0.0",
- "@types/node": "^24.10.0",
- "@types/react": "^19.2.2",
- "@types/react-dom": "^19.2.2",
- "@umijs/fabric": "^4.0.1",
+ "@types/node": "^26.0.1",
+ "@types/react": "^19.2.17",
+ "@types/react-dom": "^19.2.3",
"cross-env": "^10.1.0",
- "dumi": "^2.4.21",
- "eslint": "^8.57.1",
- "father": "^4.6.7",
- "less": "^4.4.2",
- "prettier": "^3.6.2",
- "rc-test": "^7.1.2",
- "react": "^19.2.0",
- "react-dom": "^19.2.0",
+ "dumi": "^2.4.38",
+ "eslint": "^9.39.4",
+ "eslint-config-prettier": "^10.1.8",
+ "eslint-plugin-jest": "^29.15.4",
+ "eslint-plugin-react": "^7.37.5",
+ "eslint-plugin-react-hooks": "^7.1.1",
+ "father": "^4.6.24",
+ "globals": "^17.7.0",
+ "less": "^4.6.7",
+ "prettier": "^3.9.4",
+ "rc-test": "^7.1.3",
+ "react": "^19.2.7",
+ "react-dom": "^19.2.7",
"regenerator-runtime": "^0.14.1",
- "typescript": "^6.0.3"
+ "typescript": "^6.0.3",
+ "typescript-eslint": "^8.62.1"
},
"peerDependencies": {
"react": ">=18.0.0",
diff --git a/tests/__snapshots__/listy.test.tsx.snap b/tests/__snapshots__/listy.test.tsx.snap
index 639da46..18f3cfc 100644
--- a/tests/__snapshots__/listy.test.tsx.snap
+++ b/tests/__snapshots__/listy.test.tsx.snap
@@ -1,4 +1,4 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`Listy should match snapshot 1`] = `
diff --git a/tsconfig.json b/tsconfig.json
index 39898e6..cbbdbae 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -13,5 +13,7 @@
"@rc-component/listy": ["./src/index.ts"]
},
"types": ["@testing-library/jest-dom", "node"]
- }
+ },
+ "include": ["**/*.ts", "**/*.tsx", ".dumirc.ts"],
+ "exclude": ["node_modules", "es", "lib", "dist", "docs-dist", ".doc", ".dumi/tmp", "coverage"]
}
diff --git a/vercel.json b/vercel.json
index cc12e40..5f9139e 100644
--- a/vercel.json
+++ b/vercel.json
@@ -1,3 +1,6 @@
{
- "framework": "umijs"
+ "framework": "umijs",
+ "installCommand": "npm install",
+ "buildCommand": "npm run build",
+ "outputDirectory": "docs-dist"
}