Skip to content

Commit a59f6a9

Browse files
committed
chore: update maintenance dependencies
1 parent f63f46a commit a59f6a9

8 files changed

Lines changed: 192 additions & 15 deletions

File tree

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ updates:
88
time: '21:00'
99
timezone: Asia/Shanghai
1010
open-pull-requests-limit: 10
11+
groups:
12+
npm-dependencies:
13+
patterns:
14+
- '*'
1115

1216
- package-ecosystem: github-actions
1317
directory: '/'
@@ -17,3 +21,7 @@ updates:
1721
time: '21:00'
1822
timezone: Asia/Shanghai
1923
open-pull-requests-limit: 10
24+
groups:
25+
github-actions:
26+
patterns:
27+
- '*'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22
<h1>@rc-component/steps</h1>
3-
<p><sub><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /> Part of the Ant Design ecosystem.</sub></p>
3+
<p><sub><a href="https://ant.design"><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /></a> Part of the Ant Design ecosystem.</sub></p>
44
<p>🚶 Structured React steps for progress, navigation, and multi-step workflows.</p>
55

66
<p>

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22
<h1>@rc-component/steps</h1>
3-
<p><sub><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /> Ant Design 生态的一部分。</sub></p>
3+
<p><sub><a href="https://ant.design"><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /></a> Ant Design 生态的一部分。</sub></p>
44
<p>🚶 React 步骤条组件,支持状态、图标、进度和多种布局。</p>
55

66
<p>

eslint.config.mjs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import { FlatCompat } from '@eslint/eslintrc';
2+
import js from '@eslint/js';
3+
import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
4+
import { createRequire } from 'node:module';
5+
import path from 'node:path';
6+
import { fileURLToPath } from 'node:url';
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const require = createRequire(import.meta.url);
11+
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
16+
});
17+
18+
const recommendedTsRules = new Set(Object.keys(tsEslintPlugin.configs.recommended.rules || {}));
19+
const noopRule = {
20+
meta: { type: 'problem', docs: {}, schema: [] },
21+
create: () => ({}),
22+
};
23+
24+
function normalizeConfig(config) {
25+
const next = { ...config };
26+
27+
if (next.plugins?.['@typescript-eslint']) {
28+
next.plugins = {
29+
...next.plugins,
30+
'@typescript-eslint': {
31+
...next.plugins['@typescript-eslint'],
32+
rules: {
33+
...next.plugins['@typescript-eslint'].rules,
34+
'ban-types': noopRule,
35+
},
36+
},
37+
};
38+
}
39+
40+
if (next.rules) {
41+
next.rules = Object.fromEntries(
42+
Object.entries(next.rules).filter(([ruleName]) => {
43+
if (!ruleName.startsWith('@typescript-eslint/')) {
44+
return true;
45+
}
46+
return recommendedTsRules.has(ruleName) || ruleName === '@typescript-eslint/ban-types';
47+
}),
48+
);
49+
}
50+
51+
return next;
52+
}
53+
54+
export default [
55+
{
56+
ignores: [
57+
'node_modules/',
58+
'coverage/',
59+
'es/',
60+
'lib/',
61+
'dist/',
62+
'docs-dist/',
63+
'.dumi/',
64+
'.doc/',
65+
'.vercel/',
66+
'.eslintrc.js',
67+
'src/index.d.ts',
68+
],
69+
},
70+
...compat.config(require('./.eslintrc.js')).map(normalizeConfig),
71+
{
72+
rules: {
73+
'@typescript-eslint/ban-types': 'off',
74+
'@typescript-eslint/no-empty-object-type': 'off',
75+
'@typescript-eslint/no-unsafe-function-type': 'off',
76+
'@typescript-eslint/no-unused-vars': 'off',
77+
},
78+
},
79+
];

global.d.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/// <reference types="jest" />
2+
/// <reference types="node" />
3+
/// <reference types="react" />
4+
/// <reference types="react-dom" />
5+
/// <reference types="@testing-library/jest-dom" />
6+
7+
declare module '*.css';
8+
declare module '*.less';
9+
declare module 'jsonp';
10+
11+
declare namespace JSX {
12+
type Element = React.JSX.Element;
13+
interface ElementClass extends React.JSX.ElementClass {}
14+
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
15+
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
16+
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
17+
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
18+
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
19+
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
20+
}
21+
22+
declare namespace jest {
23+
interface Matchers<R> {
24+
lastCalledWith(...expected: unknown[]): R;
25+
nthCalledWith(nthCall: number, ...expected: unknown[]): R;
26+
toBeCalled(): R;
27+
toBeCalledTimes(expected: number): R;
28+
toBeCalledWith(...expected: unknown[]): R;
29+
}
30+
}
31+
32+
declare const vi: {
33+
fn: <T extends (...args: any[]) => any = (...args: any[]) => any>(implementation?: T) => jest.MockedFunction<T>;
34+
mock: (moduleName: string, factory?: (importOriginal: <T>() => Promise<T>) => unknown) => void;
35+
spyOn: typeof jest.spyOn;
36+
useFakeTimers: () => void;
37+
useRealTimers: () => void;
38+
advanceTimersByTime: (msToRun: number) => void;
39+
clearAllTimers: () => void;
40+
runAllTimers: () => void;
41+
importActual: <T>(moduleName: string) => Promise<T>;
42+
clearAllMocks: () => void;
43+
resetAllMocks: () => void;
44+
restoreAllMocks: () => void;
45+
};
46+
47+
declare const describe: any;
48+
declare const it: any;
49+
declare const test: any;
50+
declare const beforeEach: any;
51+
declare const afterEach: any;
52+
declare const beforeAll: any;
53+
declare const afterAll: any;
54+
declare const expect: any;
55+
56+
declare module 'moment/locale/zh-cn';

package.json

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,28 +53,37 @@
5353
"@rc-component/father-plugin": "^2.2.0",
5454
"@rc-component/np": "^1.0.4",
5555
"@testing-library/jest-dom": "^6.9.1",
56-
"@testing-library/react": "^15.0.7",
57-
"@types/jest": "^29.5.14",
56+
"@testing-library/react": "^16.3.2",
57+
"@types/jest": "^30.0.0",
5858
"@types/node": "^26.0.1",
59-
"@types/react": "^18.3.31",
60-
"@types/react-dom": "^18.3.7",
59+
"@types/react": "^19.2.17",
60+
"@types/react-dom": "^19.2.3",
6161
"@umijs/fabric": "^4.0.1",
6262
"dumi": "^2.4.35",
63-
"eslint": "^8.57.1",
64-
"eslint-plugin-jest": "^27.9.0",
65-
"eslint-plugin-unicorn": "^56.0.1",
63+
"eslint": "^9.39.4",
64+
"eslint-plugin-jest": "^29.15.3",
65+
"eslint-plugin-unicorn": "^65.0.1",
6666
"father": "^4.6.23",
6767
"gh-pages": "^6.3.0",
6868
"glob": "^13.0.6",
6969
"husky": "^9.1.7",
7070
"less": "^4.6.7",
71-
"lint-staged": "^16.4.0",
71+
"lint-staged": "^17.0.8",
7272
"prettier": "^3.9.0",
7373
"rc-test": "^7.1.3",
74-
"react": "^18.3.1",
75-
"react-dom": "^18.3.1",
76-
"typescript": "^5.9.3",
77-
"cross-env": "^10.1.0"
74+
"react": "^19.2.7",
75+
"react-dom": "^19.2.7",
76+
"typescript": "^6.0.3",
77+
"cross-env": "^10.1.0",
78+
"@eslint/eslintrc": "^3.3.5",
79+
"@eslint/js": "^9.39.4",
80+
"eslint-plugin-react": "^7.37.5",
81+
"eslint-plugin-react-hooks": "^7.1.1",
82+
"eslint-config-prettier": "^10.1.8",
83+
"@babel/eslint-parser": "^7.29.7",
84+
"@babel/eslint-plugin": "^7.29.7",
85+
"@typescript-eslint/eslint-plugin": "^8.62.0",
86+
"@typescript-eslint/parser": "^8.62.0"
7887
},
7988
"peerDependencies": {
8089
"react": ">=16.9.0",

react-compat.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as React from 'react';
2+
3+
declare module 'react' {
4+
type ReactText = string | number;
5+
function useRef<T = undefined>(): React.MutableRefObject<T | undefined>;
6+
function isValidElement<P = any>(object: {} | null | undefined): object is React.ReactElement<P>;
7+
function cloneElement<P = any>(
8+
element: React.ReactElement<P>,
9+
props?: (Partial<P> & React.Attributes) | null,
10+
...children: React.ReactNode[]
11+
): React.ReactElement<P>;
12+
}
13+
14+
declare module 'react-dom' {
15+
function hydrate(element: React.ReactNode, container: Element | DocumentFragment): void;
16+
}

tsconfig.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,18 @@
3131
"assets/*"
3232
]
3333
},
34-
"ignoreDeprecations": "5.0"
34+
"ignoreDeprecations": "6.0",
35+
"noImplicitAny": false,
36+
"strictNullChecks": false,
37+
"strictPropertyInitialization": false,
38+
"strictFunctionTypes": false,
39+
"strict": false,
40+
"noImplicitThis": false,
41+
"strictBindCallApply": false
3542
},
3643
"include": [
44+
"react-compat.d.ts",
45+
"global.d.ts",
3746
".fatherrc.ts",
3847
".dumirc.ts",
3948
"src",

0 commit comments

Comments
 (0)