mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-23 18:50:06 +08:00
chore(deps): update dependency eslint to v9 (#50690)
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
parent
9c4d5496bd
commit
863f61d908
@ -11,15 +11,15 @@ module.exports = {
|
||||
],
|
||||
modulePattern: [
|
||||
{
|
||||
pattern: /ConfigContext.*renderEmpty/ms,
|
||||
pattern: /ConfigContext.*renderEmpty/s,
|
||||
module: '../empty',
|
||||
},
|
||||
{
|
||||
pattern: /ConfigConsumer.*renderEmpty/ms,
|
||||
pattern: /ConfigConsumer.*renderEmpty/s,
|
||||
module: '../empty',
|
||||
},
|
||||
{
|
||||
pattern: /config-provider\/context.*renderEmpty/ms,
|
||||
pattern: /config-provider\/context.*renderEmpty/s,
|
||||
module: '../empty',
|
||||
},
|
||||
],
|
||||
|
@ -89,7 +89,6 @@ const useThemeAnimation = () => {
|
||||
.startViewTransition(async () => {
|
||||
// wait for theme change end
|
||||
while (colorBgElevated === animateRef.current.colorBgElevated) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(resolve, 1000 / 60);
|
||||
});
|
||||
@ -99,6 +98,7 @@ const useThemeAnimation = () => {
|
||||
root.classList.add(isDark ? 'light' : 'dark');
|
||||
})
|
||||
.ready.then(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`Theme transition finished in ${Date.now() - time}ms`);
|
||||
const clipPath = [
|
||||
`circle(0px at ${x}px ${y}px)`,
|
||||
|
@ -1,3 +1,3 @@
|
||||
// must be .js file, can't modify to be .ts file!
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
|
||||
export { default } from './theme/common/Loading';
|
||||
|
@ -112,7 +112,7 @@ export const BannerRecommendsFallback: React.FC = () => {
|
||||
const { isMobile } = useContext(SiteContext);
|
||||
const { styles } = useStyle();
|
||||
|
||||
const list = Array(3).fill(1);
|
||||
const list = new Array(3).fill(1);
|
||||
|
||||
return isMobile ? (
|
||||
<Carousel className={styles.carousel}>
|
||||
@ -140,7 +140,7 @@ const BannerRecommends: React.FC = () => {
|
||||
const data = useSiteData();
|
||||
const extras = data?.extras?.[lang];
|
||||
const icons = data?.icons || [];
|
||||
const first3 = !extras || extras.length === 0 ? Array(3).fill(null) : extras.slice(0, 3);
|
||||
const first3 = !extras || extras.length === 0 ? new Array(3).fill(null) : extras.slice(0, 3);
|
||||
|
||||
if (!data) {
|
||||
return <BannerRecommendsFallback />;
|
||||
|
@ -102,7 +102,6 @@ const ThemeColorPicker: React.FC<ThemeColorPickerProps> = ({ value, onChange, id
|
||||
<Flex gap="middle">
|
||||
{matchColors.map<React.ReactNode>(({ color, active, picker }) => {
|
||||
const colorNode = (
|
||||
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
||||
<label
|
||||
key={color}
|
||||
className={classNames(styles.color, { [styles.colorActive]: active })}
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable jsx-a11y/label-has-associated-control */
|
||||
import * as React from 'react';
|
||||
import { Flex } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
|
@ -46,6 +46,7 @@ const { Header, Content, Sider } = Layout;
|
||||
|
||||
const TokenChecker: React.FC = () => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Demo Token:', theme.useToken());
|
||||
}
|
||||
return null;
|
||||
|
@ -72,7 +72,7 @@ function rehypeAntd(): UnifiedTransformer<HastRoot> {
|
||||
|
||||
if (typeof lang === 'string' && lang.startsWith('sandpack')) {
|
||||
const code = (node.children[0] as any).value as string;
|
||||
const configRegx = /^const sandpackConfig = ([\S\s]*?});/;
|
||||
const configRegx = /^const sandpackConfig = ([\s\S]*?});/;
|
||||
const [configString] = code.match(configRegx) || [];
|
||||
/* biome-ignore lint/security/noGlobalEval: used in documentation */ /* eslint-disable-next-line no-eval */
|
||||
const config = configString && eval(`(${configString.replace(configRegx, '$1')})`);
|
||||
|
@ -141,12 +141,12 @@
|
||||
|
||||
const title = document.createElement('div');
|
||||
title.className = 'mirror-modal-title';
|
||||
title.innerText = '提示';
|
||||
title.textContent = '提示';
|
||||
dialog.append(title);
|
||||
|
||||
const content = document.createElement('div');
|
||||
content.className = 'mirror-modal-content';
|
||||
content.innerText = '🚀 国内用户推荐访问国内镜像以获得极速体验~';
|
||||
content.textContent = '🚀 国内用户推荐访问国内镜像以获得极速体验~';
|
||||
dialog.append(content);
|
||||
|
||||
const btnWrapper = document.createElement('div');
|
||||
@ -155,7 +155,7 @@
|
||||
|
||||
const cancelBtn = document.createElement('a');
|
||||
cancelBtn.className = 'mirror-modal-cancel-btn mirror-modal-btn';
|
||||
cancelBtn.innerText = '7 天内不再显示';
|
||||
cancelBtn.textContent = '7 天内不再显示';
|
||||
btnWrapper.append(cancelBtn);
|
||||
cancelBtn.addEventListener('click', () => {
|
||||
window.localStorage.setItem(ANTD_DOT_NOT_SHOW_MIRROR_MODAL, new Date().toISOString());
|
||||
@ -167,7 +167,7 @@
|
||||
const confirmBtn = document.createElement('a');
|
||||
confirmBtn.className = 'mirror-modal-confirm-btn mirror-modal-btn';
|
||||
confirmBtn.href = window.location.href.replace(window.location.host, 'ant-design.antgroup.com');
|
||||
confirmBtn.innerText = '🚀 立刻前往';
|
||||
confirmBtn.textContent = '🚀 立刻前往';
|
||||
btnWrapper.append(confirmBtn);
|
||||
|
||||
document.body.append(modal);
|
||||
|
@ -24,7 +24,6 @@ interface NewToken {
|
||||
|
||||
// 通过给 antd-style 扩展 CustomToken 对象类型定义,可以为 useTheme 中增加相应的 token 对象
|
||||
declare module 'antd-style' {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface CustomToken extends NewToken {}
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ const IconSearch: React.FC = () => {
|
||||
let iconList = categories[key as CategoriesKeys];
|
||||
if (searchKey) {
|
||||
const matchKey = searchKey
|
||||
// eslint-disable-next-line prefer-regex-literals
|
||||
|
||||
.replace(/^<([a-z]*)\s\/>$/gi, (_, name) => name)
|
||||
.replace(/(Filled|Outlined|TwoTone)$/, '')
|
||||
.toLowerCase();
|
||||
|
@ -44,15 +44,13 @@ const IconSearchFallback: React.FC = () => {
|
||||
</div>
|
||||
<Skeleton.Button active style={{ margin: '28px 0 10px', width: 100 }} />
|
||||
<div className={styles.fallbackWrapper}>
|
||||
{Array(24)
|
||||
.fill(1)
|
||||
.map((_, index) => (
|
||||
<div key={index} className={styles.skeletonWrapper}>
|
||||
<Skeleton.Node active style={{ height: 110, width: '100%' }}>
|
||||
{' '}
|
||||
</Skeleton.Node>
|
||||
</div>
|
||||
))}
|
||||
{new Array(24).fill(1).map((_, index) => (
|
||||
<div key={index} className={styles.skeletonWrapper}>
|
||||
<Skeleton.Node active style={{ height: 110, width: '100%' }}>
|
||||
{' '}
|
||||
</Skeleton.Node>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable react/no-array-index-key */
|
||||
import * as React from 'react';
|
||||
import { Avatar, Divider, Empty, Skeleton, Tabs } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable global-require, import/no-unresolved */
|
||||
import React from 'react';
|
||||
import { BugOutlined, HistoryOutlined } from '@ant-design/icons';
|
||||
import { Button, Drawer, Grid, Popover, Timeline, Typography } from 'antd';
|
||||
|
@ -1,21 +1,19 @@
|
||||
import React from 'react';
|
||||
import Icon from '@ant-design/icons';
|
||||
|
||||
const ThemeIcon: React.FC<{ className?: string }> = (props) => {
|
||||
const SVGIcon = React.useCallback(
|
||||
() => (
|
||||
<svg width={20} height={20} viewBox="0 0 24 24" fill="currentColor" {...props}>
|
||||
<title>Theme icon</title>
|
||||
<g fillRule="evenodd">
|
||||
<g fillRule="nonzero">
|
||||
<path d="M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
),
|
||||
[props],
|
||||
);
|
||||
return <Icon component={SVGIcon} {...props} />;
|
||||
};
|
||||
const SVGIcon: React.FC = (props) => (
|
||||
<svg width={20} height={20} viewBox="0 0 24 24" fill="currentColor" {...props}>
|
||||
<title>Theme icon</title>
|
||||
<g fillRule="evenodd">
|
||||
<g fillRule="nonzero">
|
||||
<path d="M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
|
||||
const ThemeIcon: React.FC<{ className?: string }> = (props) => (
|
||||
<Icon component={SVGIcon} {...props} />
|
||||
);
|
||||
|
||||
export default ThemeIcon;
|
||||
|
@ -37,7 +37,6 @@ export const getHash = (str: string, length = 8) =>
|
||||
* extends dumi internal tech stack, for customize previewer props
|
||||
*/
|
||||
class AntdReactTechStack extends ReactTechStack {
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
generatePreviewerProps(...[props, opts]: any) {
|
||||
props.pkgDependencyList = { ...devDependencies, ...dependencies };
|
||||
props.jsx ??= '';
|
||||
|
@ -210,7 +210,6 @@ const Header: React.FC = () => {
|
||||
};
|
||||
}, []);
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
const handleVersionChange = useCallback((url: string) => {
|
||||
const currentUrl = window.location.href;
|
||||
const currentPathname = window.location.pathname;
|
||||
|
@ -1,24 +0,0 @@
|
||||
components/**/*.js
|
||||
components/**/*.jsx
|
||||
components/version/token.tsx
|
||||
!components/*/__tests__/**/*.js
|
||||
!components/*/demo/*.md
|
||||
!.*.js
|
||||
~*
|
||||
typings
|
||||
es/**/*
|
||||
lib/**/*
|
||||
locale
|
||||
server
|
||||
.dumi/tmp
|
||||
.dumi/tmp-production
|
||||
!.dumi/
|
||||
node_modules
|
||||
.eslintcache
|
||||
_site
|
||||
dist
|
||||
coverage
|
||||
**/*.d.ts
|
||||
# Scripts
|
||||
scripts/previewEditor/**/*
|
||||
jest-stare
|
231
.eslintrc.js
231
.eslintrc.js
@ -1,231 +0,0 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'airbnb',
|
||||
'prettier',
|
||||
'plugin:compat/recommended',
|
||||
'plugin:jest/recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:import/typescript',
|
||||
'plugin:markdown/recommended-legacy',
|
||||
],
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
jasmine: true,
|
||||
jest: true,
|
||||
es6: true,
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
polyfills: ['Promise', 'URL'],
|
||||
'import/resolver': {
|
||||
typescript: {},
|
||||
},
|
||||
},
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: [
|
||||
'react',
|
||||
'@babel',
|
||||
'jest',
|
||||
'@typescript-eslint',
|
||||
'react-hooks',
|
||||
'unicorn',
|
||||
'markdown',
|
||||
'lodash',
|
||||
],
|
||||
// https://github.com/typescript-eslint/typescript-eslint/issues/46#issuecomment-470486034
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': [2, { args: 'none' }],
|
||||
'no-unused-expressions': 'off',
|
||||
'@typescript-eslint/no-unused-expressions': 2,
|
||||
'@typescript-eslint/consistent-type-imports': [2, { disallowTypeAnnotations: false }],
|
||||
'import/consistent-type-specifier-style': 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
// In v2, explicitly apply eslint-plugin-markdown's `markdown`
|
||||
// processor on any Markdown files you want to lint.
|
||||
files: ['components/*/demo/*.md'],
|
||||
processor: 'markdown/markdown',
|
||||
},
|
||||
{
|
||||
// In v2, configuration for fenced code blocks is separate from the
|
||||
// containing Markdown file. Each code block has a virtual filename
|
||||
// appended to the Markdown file's path.
|
||||
files: [
|
||||
'components/*/demo/*.md/*.ts',
|
||||
'components/*/demo/*.md/*.tsx',
|
||||
'components/*/demo/*.md/*.js',
|
||||
'components/*/demo/*.md/*.jsx',
|
||||
],
|
||||
// Configuration for fenced code blocks goes with the override for
|
||||
// the code block's virtual filename, for example:
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
impliedStrict: true,
|
||||
},
|
||||
},
|
||||
globals: {
|
||||
React: true,
|
||||
ReactDOM: true,
|
||||
mountNode: true,
|
||||
},
|
||||
rules: {
|
||||
indent: 0,
|
||||
'@babel/new-cap': 0,
|
||||
'@babel/no-invalid-this': 0,
|
||||
'@babel/no-unused-expressions': 2,
|
||||
'@babel/object-curly-spacing': 0,
|
||||
'@babel/semi': 2,
|
||||
'default-case': 0,
|
||||
'eol-last': 0,
|
||||
'no-console': 0,
|
||||
'no-plusplus': 0,
|
||||
'no-script-url': 0,
|
||||
'prefer-rest-params': 0,
|
||||
'compat/compat': 0,
|
||||
'class-methods-use-this': 0,
|
||||
'react/no-access-state-in-setstate': 0,
|
||||
'react/destructuring-assignment': 0,
|
||||
'react/no-multi-comp': 0,
|
||||
'react/no-array-index-key': 0,
|
||||
'jsx-a11y/href-no-hash': 0,
|
||||
'jsx-a11y/control-has-associated-label': 0,
|
||||
'import/no-extraneous-dependencies': 0,
|
||||
'react/jsx-no-constructed-context-values': 0,
|
||||
'react/no-unstable-nested-components': 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['components/**/demo/*.tsx'],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': 0,
|
||||
'no-console': 0,
|
||||
'compat/compat': 0,
|
||||
'react/no-unstable-nested-components': 0,
|
||||
'jsx-a11y/control-has-associated-label': 0,
|
||||
'class-methods-use-this': 0,
|
||||
'react/no-access-state-in-setstate': 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['.dumi/**/*.ts', '.dumi/**/*.tsx', '.dumi/**/*.js', '.dumi/**/*.jsx'],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': 0,
|
||||
'no-console': 0,
|
||||
'compat/compat': 0,
|
||||
'react/no-unstable-nested-components': 0,
|
||||
'jsx-a11y/control-has-associated-label': 0,
|
||||
'class-methods-use-this': 0,
|
||||
'react/no-access-state-in-setstate': 0,
|
||||
'react/no-unknown-property': ['error', { ignore: ['css'] }],
|
||||
'react/no-array-index-key': 0,
|
||||
'react/button-has-type': 0,
|
||||
'react/no-danger': 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.json'],
|
||||
rules: {
|
||||
'no-unused-expressions': 0,
|
||||
'comma-dangle': 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx'],
|
||||
rules: {
|
||||
'compat/compat': 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
'react/jsx-one-expression-per-line': 0,
|
||||
'react/prop-types': 0,
|
||||
'react/forbid-prop-types': 0,
|
||||
'react/jsx-indent': 0,
|
||||
'react/jsx-wrap-multilines': ['error', { declaration: false, assignment: false }],
|
||||
'react/jsx-filename-extension': 0,
|
||||
'react/state-in-constructor': 0,
|
||||
'react/jsx-props-no-spreading': 0,
|
||||
'react/destructuring-assignment': 0, // TODO: remove later
|
||||
'react/require-default-props': 0,
|
||||
'react/sort-comp': 0,
|
||||
'react/display-name': 0,
|
||||
'react/static-property-placement': 0,
|
||||
'react/jsx-no-bind': 0, // Should not check test file
|
||||
'react/no-find-dom-node': 0,
|
||||
'react/no-unused-prop-types': 0,
|
||||
'react/default-props-match-prop-types': 0,
|
||||
'react-hooks/rules-of-hooks': 2, // Checks rules of Hooks
|
||||
'react/function-component-definition': 0,
|
||||
'react/no-unused-class-component-methods': 0,
|
||||
'import/extensions': 0,
|
||||
'import/no-cycle': 2,
|
||||
'lodash/import-scope': 2,
|
||||
'import/no-extraneous-dependencies': [
|
||||
'error',
|
||||
{
|
||||
devDependencies: [
|
||||
'site/**',
|
||||
'tests/**',
|
||||
'scripts/**',
|
||||
'scripts/*.ts',
|
||||
'**/*.test.js',
|
||||
'**/__tests__/*',
|
||||
'*.config.js',
|
||||
'**/*.md',
|
||||
],
|
||||
},
|
||||
],
|
||||
'jsx-a11y/no-static-element-interactions': 0,
|
||||
'jsx-a11y/anchor-has-content': 0,
|
||||
'jsx-a11y/click-events-have-key-events': 0,
|
||||
'jsx-a11y/anchor-is-valid': 0,
|
||||
'jsx-a11y/no-noninteractive-element-interactions': 0,
|
||||
// label-has-for has been deprecated
|
||||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
|
||||
'jsx-a11y/label-has-for': 0,
|
||||
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'consistent-return': 0, // TODO: remove later
|
||||
'no-param-reassign': 0, // TODO: remove later
|
||||
'no-underscore-dangle': 0,
|
||||
// for (let i = 0; i < len; i++)
|
||||
'no-plusplus': 0,
|
||||
// https://eslint.org/docs/rules/no-continue
|
||||
// labeledLoop is conflicted with `eslint . --fix`
|
||||
'no-continue': 0,
|
||||
// ban this for Number.isNaN needs polyfill
|
||||
'no-restricted-globals': 0,
|
||||
'max-classes-per-file': 0,
|
||||
|
||||
'jest/no-test-callback': 0,
|
||||
'jest/expect-expect': 0,
|
||||
'jest/no-done-callback': 0,
|
||||
'jest/valid-title': 0,
|
||||
'jest/no-conditional-expect': 0,
|
||||
'jest/no-standalone-expect': 0,
|
||||
|
||||
'unicorn/better-regex': 2,
|
||||
'unicorn/prefer-string-trim-start-end': 2,
|
||||
'unicorn/expiring-todo-comments': 2,
|
||||
'unicorn/no-abusive-eslint-disable': 0,
|
||||
|
||||
// https://github.com/typescript-eslint/typescript-eslint/issues/2540#issuecomment-692866111
|
||||
'no-use-before-define': 0,
|
||||
'@typescript-eslint/no-use-before-define': 2,
|
||||
'no-shadow': 0,
|
||||
'@typescript-eslint/no-shadow': [2, { ignoreTypeValueShadow: true }],
|
||||
// https://github.com/typescript-eslint/typescript-eslint/issues/2528#issuecomment-689369395
|
||||
'no-undef': 0,
|
||||
'import/order': 0,
|
||||
},
|
||||
globals: {
|
||||
gtag: true,
|
||||
},
|
||||
};
|
34
.github/dependabot.yml
vendored
34
.github/dependabot.yml
vendored
@ -5,35 +5,35 @@
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
- package-ecosystem: npm
|
||||
directory: /
|
||||
schedule:
|
||||
interval: "daily"
|
||||
interval: daily
|
||||
groups:
|
||||
rc-component-patch:
|
||||
dependency-type: "production"
|
||||
dependency-type: production
|
||||
patterns:
|
||||
- "rc-*"
|
||||
- "@rc-component*"
|
||||
update-types: ["patch"]
|
||||
update-types: [patch]
|
||||
dependencies:
|
||||
dependency-type: "production"
|
||||
dependency-type: production
|
||||
exclude-patterns:
|
||||
- "rc-*"
|
||||
- "@rc-component*"
|
||||
update-types: ["major", "minor"]
|
||||
update-types: [major, minor]
|
||||
dev-dependencies:
|
||||
dependency-type: "development"
|
||||
update-types: ["major"]
|
||||
dependency-type: development
|
||||
update-types: [major]
|
||||
ignore:
|
||||
- dependency-name: "@ant-design/cssinjs"
|
||||
- dependency-name: "dayjs"
|
||||
versions: ["1.x"]
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
- dependency-name: dayjs
|
||||
versions: [1.x]
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: "daily"
|
||||
interval: daily
|
||||
labels:
|
||||
- "github-actions"
|
||||
- "dependencies"
|
||||
- "skip-verify-files"
|
||||
- github-actions
|
||||
- dependencies
|
||||
- skip-verify-files
|
||||
|
4
.github/workflows/issue-check-inactive.yml
vendored
4
.github/workflows/issue-check-inactive.yml
vendored
@ -17,6 +17,6 @@ jobs:
|
||||
- name: check-inactive
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'check-inactive'
|
||||
inactive-label: 'Inactive'
|
||||
actions: check-inactive
|
||||
inactive-label: Inactive
|
||||
inactive-day: 30
|
||||
|
8
.github/workflows/issue-close-require.yml
vendored
8
.github/workflows/issue-close-require.yml
vendored
@ -17,15 +17,15 @@ jobs:
|
||||
- name: need reproduce
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
labels: '🤔 Need Reproduce'
|
||||
actions: close-issues
|
||||
labels: 🤔 Need Reproduce
|
||||
inactive-day: 3
|
||||
|
||||
- name: needs more info
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issues'
|
||||
labels: 'needs-more-info'
|
||||
actions: close-issues
|
||||
labels: needs-more-info
|
||||
inactive-day: 3
|
||||
body: |
|
||||
Since the issue was labeled with `needs-more-info`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
|
||||
|
8
.github/workflows/issue-labeled.yml
vendored
8
.github/workflows/issue-labeled.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
if: github.event.label.name == 'help wanted'
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
actions: create-comment
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
@ -34,7 +34,7 @@ jobs:
|
||||
if: github.event.label.name == '🤔 Need Reproduce'
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
actions: create-comment
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
@ -86,6 +86,6 @@ jobs:
|
||||
if: github.event.label.name != 'unconfirmed'
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
actions: remove-labels
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'unconfirmed'
|
||||
labels: unconfirmed
|
||||
|
12
.github/workflows/issue-open-check.yml
vendored
12
.github/workflows/issue-open-check.yml
vendored
@ -18,15 +18,15 @@ jobs:
|
||||
- uses: actions-cool/check-user-permission@v2
|
||||
id: checkUser
|
||||
with:
|
||||
require: 'write'
|
||||
require: write
|
||||
check-bot: true
|
||||
|
||||
- name: add unconfirmed label
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
actions: add-labels
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'unconfirmed'
|
||||
labels: unconfirmed
|
||||
|
||||
- name: check invalid
|
||||
if: (contains(github.event.issue.body, 'ant-design-issue-helper') == false) && (steps.checkUser.outputs.require-result == 'false')
|
||||
@ -34,7 +34,7 @@ jobs:
|
||||
with:
|
||||
actions: 'create-comment,add-labels,close-issue'
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'Invalid'
|
||||
labels: Invalid
|
||||
body: |
|
||||
Hello @${{ github.event.issue.user.login }}, your issue has been closed because it does not conform to our issue requirements. Please use the [Issue Helper](http://new-issue.ant.design) to create an issue, thank you!
|
||||
|
||||
@ -44,7 +44,7 @@ jobs:
|
||||
uses: actions-cool/issues-helper@v3
|
||||
id: checkid
|
||||
with:
|
||||
actions: 'check-issue'
|
||||
actions: check-issue
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
# 格式如:'x1,x2' or 'x1,x2/y1,y2' 最多支持 2 个数组
|
||||
title-includes: '官网,网站,国内,镜像,mobile ant design,mobile.ant.design,ant design,ant design pro,pro.ant.design/挂了,挂掉了,无法访问,不能访问,访问速度,访问慢,访问不了,加载太慢,加载慢,加载很慢,出问题,打不开,登不上,can not open,cannot open,can not be reached'
|
||||
@ -80,7 +80,7 @@ jobs:
|
||||
if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && contains(github.event.issue.title, 'IE9') == true || contains(github.event.issue.title, 'IE 9') == true || contains(github.event.issue.title, 'IE10') == true || contains(github.event.issue.title, 'IE 10') == true || contains(github.event.issue.title, 'IE11') == true || contains(github.event.issue.title, 'IE 11') == true || contains(github.event.issue.title, 'Internet Explorer') == true || contains(github.event.issue.body, 'IE9') == true || contains(github.event.issue.body, 'IE 9') == true || contains(github.event.issue.body, 'IE10') == true || contains(github.event.issue.body, 'IE 10') == true || contains(github.event.issue.body, 'IE11') == true || contains(github.event.issue.body, 'IE 11') == true || contains(github.event.issue.body, 'Internet Explorer') == true
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'add-labels'
|
||||
actions: add-labels
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'IE | Firefox | Safari,Internet Explorer'
|
||||
|
||||
|
2
.github/workflows/issue-remove-inactive.yml
vendored
2
.github/workflows/issue-remove-inactive.yml
vendored
@ -20,6 +20,6 @@ jobs:
|
||||
if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
actions: remove-labels
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: 'Inactive, needs-more-info'
|
||||
|
2
.github/workflows/issue-schedule.yml
vendored
2
.github/workflows/issue-schedule.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
DINGDING_BOT_TOKEN: ${{ secrets.DINGDING_BOT_COLLABORATOR_TOKEN }}
|
||||
actionTitle: '近 7 天未确认的 issue'
|
||||
actionTitle: 近 7 天未确认的 issue
|
||||
with:
|
||||
script: |
|
||||
const dingdingTokenKey = process.env.DINGDING_BOT_TOKEN;
|
||||
|
4
.github/workflows/mock-project-build.yml
vendored
4
.github/workflows/mock-project-build.yml
vendored
@ -57,10 +57,10 @@ jobs:
|
||||
- uses: actions-cool/ci-notice@v1
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
notice-types: 'dingding'
|
||||
notice-types: dingding
|
||||
# Exit directly with non-zero to trigger the failure logic of ci-notice.
|
||||
ci: |
|
||||
echo "❌ CI Mock Project Build Failed"
|
||||
exit 1
|
||||
dingding-token: ${{ secrets.DINGDING_BOT_COLLABORATOR_TOKEN }}
|
||||
notice-title: 'CI Mock Project Build Failed'
|
||||
notice-title: CI Mock Project Build Failed
|
||||
|
8
.github/workflows/pr-check-ci.yml
vendored
8
.github/workflows/pr-check-ci.yml
vendored
@ -20,13 +20,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions-cool/check-pr-ci@v1
|
||||
with:
|
||||
filter-label: 'BranchAutoMerge'
|
||||
filter-creator-authority: 'write'
|
||||
filter-label: BranchAutoMerge
|
||||
filter-creator-authority: write
|
||||
filter-head-ref: 'master, feature, next, master-merge-feature, feature-merge-master, next-merge-master, next-merge-feature'
|
||||
filter-support-fork: false
|
||||
skip-run-names: 'deploy preview, pr-check-ci, upstream workflow summary, suggest-related-links, download visual-regression report'
|
||||
conflict-review-body: '😅 This branch has conflicts that must be resolved!'
|
||||
conflict-review-body: 😅 This branch has conflicts that must be resolved!
|
||||
success-review: true
|
||||
success-merge: true
|
||||
merge-method: 'merge'
|
||||
merge-method: merge
|
||||
merge-title: 'chore: auto merge branches (#${number})'
|
||||
|
2
.github/workflows/pr-check-merge.yml
vendored
2
.github/workflows/pr-check-merge.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
actions: create-comment
|
||||
issue-number: ${{ github.event.number }}
|
||||
body: |
|
||||
Hi @${{ github.event.pull_request.user.login }}。
|
||||
|
2
.github/workflows/pr-contributor-welcome.yml
vendored
2
.github/workflows/pr-contributor-welcome.yml
vendored
@ -39,4 +39,4 @@ jobs:
|
||||
<img src="https://github.com/user-attachments/assets/cfee105e-8731-481f-a336-92b79a84d35a" height="200" />
|
||||
|
||||
<!-- WELCOME_CONTRIBUTION -->
|
||||
body-include: '<!-- WELCOME_CONTRIBUTION -->'
|
||||
body-include: <!-- WELCOME_CONTRIBUTION -->
|
||||
|
4
.github/workflows/pr-open-check.yml
vendored
4
.github/workflows/pr-open-check.yml
vendored
@ -16,8 +16,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions-cool/pr-welcome@v1
|
||||
with:
|
||||
refuse-issue-label: '🎱 Collaborate PR only'
|
||||
need-creator-authority: 'write'
|
||||
refuse-issue-label: 🎱 Collaborate PR only
|
||||
need-creator-authority: write
|
||||
comment: |
|
||||
Hi @${{ github.event.pull_request.user.login }}. The issue mentioned in this PR needs to be confirmed with the designer or core team. Thank you for your contribution! 😊
|
||||
|
||||
|
2
.github/workflows/preview-build.yml
vendored
2
.github/workflows/preview-build.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
||||
id: site
|
||||
run: bun run site
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
- name: run e2e test
|
||||
run: bun run test:site
|
||||
- name: upload site artifact
|
||||
|
6
.github/workflows/preview-deploy.yml
vendored
6
.github/workflows/preview-deploy.yml
vendored
@ -4,7 +4,7 @@ name: Preview Deploy
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Preview Build"]
|
||||
workflows: [Preview Build]
|
||||
types:
|
||||
- completed
|
||||
|
||||
@ -104,7 +104,7 @@ jobs:
|
||||
body: |
|
||||
[<img width="300" alt="Preview is ready" src="https://user-images.githubusercontent.com/5378891/72400743-23dbb200-3785-11ea-9d13-1a2d92743846.png">](https://preview-${{ steps.pr.outputs.id }}-ant-design.surge.sh)
|
||||
<!-- AUTO_PREVIEW_HOOK -->
|
||||
body-include: '<!-- AUTO_PREVIEW_HOOK -->'
|
||||
body-include: <!-- AUTO_PREVIEW_HOOK -->
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
|
||||
- name: failed comment
|
||||
@ -115,7 +115,7 @@ jobs:
|
||||
body: |
|
||||
[<img width="300" alt="Preview failed" src="https://user-images.githubusercontent.com/5378891/75333447-1e63a280-58c1-11ea-975d-235367fd1522.png">](https://preview-${{ steps.pr.outputs.id }}-ant-design.surge.sh)
|
||||
<!-- AUTO_PREVIEW_HOOK -->
|
||||
body-include: '<!-- AUTO_PREVIEW_HOOK -->'
|
||||
body-include: <!-- AUTO_PREVIEW_HOOK -->
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
|
||||
- name: Check surge deploy result and exit if failed
|
||||
|
2
.github/workflows/preview-start.yml
vendored
2
.github/workflows/preview-start.yml
vendored
@ -28,4 +28,4 @@ jobs:
|
||||
body: |
|
||||
[<img width="500" alt="Prepare preview" src="https://user-images.githubusercontent.com/5378891/72351368-2c979e00-371b-11ea-9652-eb4e825d745e.gif">](https://preview-${{ github.event.number }}-ant-design.surge.sh)
|
||||
<!-- AUTO_PREVIEW_HOOK -->
|
||||
body-include: '<!-- AUTO_PREVIEW_HOOK -->'
|
||||
body-include: <!-- AUTO_PREVIEW_HOOK -->
|
||||
|
10
.github/workflows/release-dingtalk.yml
vendored
10
.github/workflows/release-dingtalk.yml
vendored
@ -23,13 +23,13 @@ jobs:
|
||||
- name: Send to Ant Design DingGroup
|
||||
uses: actions-cool/release-helper@v2
|
||||
with:
|
||||
trigger: 'tag'
|
||||
trigger: tag
|
||||
changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md'
|
||||
branch: 'master, 4.x-stable'
|
||||
tag: '5*, 4*'
|
||||
latest: '5*'
|
||||
dingding-token: ${{ secrets.DINGDING_BOT_TOKEN }} ${{ secrets.DINGDING_BOT_COLLABORATOR_TOKEN }} ${{ secrets.DINGDING_BOT_MAINTAINER_TOKEN }}
|
||||
dingding-msg: 'CHANGELOG.zh-CN.md'
|
||||
dingding-msg: CHANGELOG.zh-CN.md
|
||||
msg-title: '# Ant Design {{v}} 发布日志'
|
||||
msg-poster: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ'
|
||||
msg-footer: '💬 前往 [**Ant Design Releases**]({{url}}) 查看更新日志'
|
||||
@ -39,17 +39,17 @@ jobs:
|
||||
- name: Send to Bigfish DingGroup
|
||||
uses: actions-cool/release-helper@v2
|
||||
with:
|
||||
trigger: 'tag'
|
||||
trigger: tag
|
||||
changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md'
|
||||
branch: 'master, 4.x-stable'
|
||||
tag: '5*, 4*'
|
||||
latest: '5*'
|
||||
dingding-token: ${{ secrets.DINGDING_BOT_BIGFISH_TOKEN }} ${{ secrets.DINGDING_BOT_BIGFISH_2_TOKEN }} ${{ secrets.DINGDING_BOT_YUNFENGDIE_TOKEN }}
|
||||
dingding-msg: 'CHANGELOG.zh-CN.md'
|
||||
dingding-msg: CHANGELOG.zh-CN.md
|
||||
dingding-delay-minute: 10
|
||||
release: false
|
||||
conch-tag: 'conch-v5, conch'
|
||||
antd-conch-msg: '🐟 当前 Bigfish 内嵌 antd 版本:'
|
||||
antd-conch-msg: 🐟 当前 Bigfish 内嵌 antd 版本:
|
||||
msg-title: '# Ant Design {{v}} 发布日志'
|
||||
msg-poster: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ'
|
||||
msg-footer: '💬 前往 [**Ant Design Releases**]({{url}}) 查看更新日志'
|
||||
|
4
.github/workflows/site-deploy.yml
vendored
4
.github/workflows/site-deploy.yml
vendored
@ -25,13 +25,13 @@ jobs:
|
||||
- name: build site
|
||||
run: bun run predeploy
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
|
||||
- name: build dist and bundle analyzer report
|
||||
run: bun run dist
|
||||
env:
|
||||
ANALYZER: 1
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
|
||||
- name: Get version
|
||||
id: publish-version
|
||||
|
2
.github/workflows/size-limit.yml
vendored
2
.github/workflows/size-limit.yml
vendored
@ -25,6 +25,6 @@ jobs:
|
||||
package_manager: bun
|
||||
build_script: dist
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
PRODUCTION_ONLY: 1
|
||||
CI_JOB_NUMBER: 1
|
||||
|
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
react: ['16', '17']
|
||||
shard: ['1/2', '2/2']
|
||||
shard: [1/2, 2/2]
|
||||
env:
|
||||
REACT: ${{ matrix.react }}
|
||||
runs-on: ubuntu-latest
|
||||
@ -58,8 +58,8 @@ jobs:
|
||||
name: test-react-latest
|
||||
strategy:
|
||||
matrix:
|
||||
module: ['dom']
|
||||
shard: ['1/2', '2/2']
|
||||
module: [dom]
|
||||
shard: [1/2, 2/2]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -85,8 +85,8 @@ jobs:
|
||||
name: test-react-latest-dist
|
||||
strategy:
|
||||
matrix:
|
||||
module: ['dist', 'dist-min']
|
||||
shard: ['1/2', '2/2']
|
||||
module: [dist, dist-min]
|
||||
shard: [1/2, 2/2]
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
@ -170,7 +170,7 @@ jobs:
|
||||
- name: dist
|
||||
run: bun run dist
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
CI: 1
|
||||
|
||||
- name: check build files
|
||||
@ -204,7 +204,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
module: [lib, es]
|
||||
shard: ['1/2', '2/2']
|
||||
shard: [1/2, 2/2]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
|
14
.github/workflows/verify-files-modify.yml
vendored
14
.github/workflows/verify-files-modify.yml
vendored
@ -18,10 +18,10 @@ jobs:
|
||||
with:
|
||||
forbid-paths: '.github/, scripts/'
|
||||
forbid-files: 'CHANGELOG.zh-CN.md, CHANGELOG.en-US.md, LICENSE'
|
||||
skip-verify-authority: 'write'
|
||||
skip-label: 'skip-verify-files'
|
||||
skip-verify-authority: write
|
||||
skip-label: skip-verify-files
|
||||
assignees: 'afc163, zombieJ, xrkffgg, MadCcc'
|
||||
comment-mark: 'version'
|
||||
comment-mark: version
|
||||
comment: |
|
||||
Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution. The path `.github/` or `scripts/` and `CHANGELOG` is only maintained by team members. This current PR will be closed and team members will help on this.
|
||||
close: true
|
||||
@ -35,11 +35,11 @@ jobs:
|
||||
- name: verify-version
|
||||
uses: actions-cool/verify-files-modify@v1
|
||||
with:
|
||||
forbid-files: 'README.md'
|
||||
skip-verify-authority: 'write'
|
||||
skip-label: 'skip-verify-files'
|
||||
forbid-files: README.md
|
||||
skip-verify-authority: write
|
||||
skip-label: skip-verify-files
|
||||
assignees: 'afc163, zombieJ, xrkffgg, MadCcc'
|
||||
comment-mark: 'readmeCheck'
|
||||
comment-mark: readmeCheck
|
||||
comment: |
|
||||
Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution. But, we don't have plan to add README of more languages. This current PR will be closed and team members will help on this.
|
||||
close: true
|
||||
|
2
.github/workflows/verify-package-version.yml
vendored
2
.github/workflows/verify-package-version.yml
vendored
@ -19,6 +19,6 @@ jobs:
|
||||
- name: verify-version
|
||||
uses: actions-cool/verify-package-version@v1
|
||||
with:
|
||||
title-include-content: 'docs'
|
||||
title-include-content: docs
|
||||
title-include-version: true
|
||||
open-comment: true
|
||||
|
@ -21,7 +21,7 @@ jobs:
|
||||
name: visual-diff snapshot
|
||||
strategy:
|
||||
matrix:
|
||||
shard: ['1/2', '2/2']
|
||||
shard: [1/2, 2/2]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -35,7 +35,7 @@ jobs:
|
||||
bun run version
|
||||
bun run test:image -- --shard=${{matrix.shard}}
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
name: artifact snapshot
|
||||
|
@ -4,7 +4,7 @@ name: 👀 Visual Regression Diff Finish
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["👀 Visual Regression Diff Build"]
|
||||
workflows: [👀 Visual Regression Diff Build]
|
||||
types:
|
||||
- completed
|
||||
|
||||
@ -130,7 +130,7 @@ jobs:
|
||||
body: |
|
||||
${{ steps.report.outputs.content }}
|
||||
<!-- VISUAL_DIFF_REGRESSION_HOOK -->
|
||||
body-include: '<!-- VISUAL_DIFF_REGRESSION_HOOK -->'
|
||||
body-include: <!-- VISUAL_DIFF_REGRESSION_HOOK -->
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
|
||||
- name: failed comment
|
||||
@ -147,7 +147,7 @@ jobs:
|
||||
- `report upload` status: ${{ steps.report.outcome }}
|
||||
- workflow url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
<!-- VISUAL_DIFF_REGRESSION_HOOK -->
|
||||
body-include: '<!-- VISUAL_DIFF_REGRESSION_HOOK -->'
|
||||
body-include: <!-- VISUAL_DIFF_REGRESSION_HOOK -->
|
||||
number: ${{ steps.pr.outputs.id }}
|
||||
|
||||
# Resync commit status. This will be also reset by `visual-regression-diff-approver`
|
||||
|
@ -34,4 +34,4 @@ jobs:
|
||||
<img src="https://github.com/ant-design/ant-design/assets/507615/5d52d8a2-f74e-4159-9792-c705b7bc1744" width="300" />
|
||||
|
||||
<!-- VISUAL_DIFF_REGRESSION_HOOK -->
|
||||
body-include: '<!-- VISUAL_DIFF_REGRESSION_HOOK -->'
|
||||
body-include: <!-- VISUAL_DIFF_REGRESSION_HOOK -->
|
||||
|
@ -4,7 +4,7 @@ name: 👁️ Visual Regression Persist Finish
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["👁️ Visual Regression Persist Start"]
|
||||
workflows: [👁️ Visual Regression Persist Start]
|
||||
types:
|
||||
- completed
|
||||
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
||||
bun run test:image
|
||||
tar -czvf imageSnapshots.tar.gz imageSnapshots/*
|
||||
env:
|
||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
|
||||
# Upload `imageSnapshots` on master
|
||||
- name: upload report artifact
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"*.{ts,tsx,js,jsx,css}": ["biome check --write"],
|
||||
"*.{ts,tsx,js,jsx,css,mjs,json}": ["biome check --write"],
|
||||
"*.{md,yml}": ["prettier --ignore-unknown --write"]
|
||||
}
|
||||
|
3
.npmrc
3
.npmrc
@ -1,5 +1,4 @@
|
||||
package-lock=false
|
||||
|
||||
legacy-peer-deps=true
|
||||
PUPPETEER_DOWNLOAD_BASE_URL="https://cdn.npmmirror.com/binaries/chrome-for-testing"
|
||||
|
||||
npm_config_sharp_libvips_binary_host="https://cdn.npmmirror.com/binaries/sharp-libvips"
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* eslint-disable global-require, import/no-unresolved */
|
||||
|
||||
/* eslint-disable no-restricted-globals */
|
||||
// This is a alias proxy, which will use global `@ant-design/cssinjs` first.
|
||||
// Use local if global not found.
|
||||
let cssinjs;
|
||||
@ -13,6 +12,7 @@ if (typeof window !== 'undefined' && window.antdCssinjs) {
|
||||
} else {
|
||||
// Use local version.
|
||||
// Use relative path since webpack will also replace module here.
|
||||
// eslint-disable-next-line antfu/no-import-node-modules-by-path
|
||||
cssinjs = require('../node_modules/@ant-design/cssinjs');
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ describe('node', () => {
|
||||
);
|
||||
|
||||
// Use mock to get config
|
||||
require(`../../${componentTestFile}`); // eslint-disable-line global-require, import/no-dynamic-require
|
||||
require(`../../${componentTestFile}`);
|
||||
const option = (global as any).testConfig?.[componentName];
|
||||
|
||||
demoList.forEach((demoFile) => {
|
||||
@ -42,7 +42,7 @@ describe('node', () => {
|
||||
const test = skip.some((skipMarkdown) => demoFile.includes(skipMarkdown)) ? it.skip : it;
|
||||
|
||||
test(demoFile, () => {
|
||||
const Demo = require(`../../${demoFile}`).default; // eslint-disable-line global-require, import/no-dynamic-require
|
||||
const Demo = require(`../../${demoFile}`).default;
|
||||
expect(() => {
|
||||
renderToString(<Demo />);
|
||||
}).not.toThrow();
|
||||
|
@ -4,10 +4,6 @@ import type { GetProp, GetProps, GetRef } from '../type';
|
||||
|
||||
describe('type', () => {
|
||||
class CC extends React.Component<{ bamboo?: number }> {
|
||||
getBamboo() {
|
||||
return this.props.bamboo;
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.props.bamboo;
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable class-methods-use-this */
|
||||
import React from 'react';
|
||||
import KeyCode from 'rc-util/lib/KeyCode';
|
||||
|
||||
|
@ -21,7 +21,6 @@ describe('Wave component', () => {
|
||||
let disCnt = 0;
|
||||
|
||||
beforeAll(() => {
|
||||
/* eslint-disable class-methods-use-this */
|
||||
class FakeResizeObserver {
|
||||
observe = () => {
|
||||
obCnt += 1;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable */
|
||||
export function easeInOutCubic(t: number, b: number, c: number, d: number) {
|
||||
const cc = c - b;
|
||||
// biome-ignore lint: it is a common easing function
|
||||
|
@ -27,10 +27,9 @@ const initCollapseMotion = (rootCls = defaultPrefixCls): CSSMotionProps => ({
|
||||
motionDeadline: 500,
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
|
||||
const _SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
|
||||
|
||||
export type SelectCommonPlacement = (typeof SelectPlacements)[number];
|
||||
export type SelectCommonPlacement = (typeof _SelectPlacements)[number];
|
||||
|
||||
const getTransitionName = (rootPrefixCls: string, motion: string, transitionName?: string) => {
|
||||
if (transitionName !== undefined) {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable default-case */
|
||||
import type { AlignType, BuildInPlacements } from '@rc-component/trigger';
|
||||
|
||||
import { getArrowOffsetToken } from '../style/placementArrow';
|
||||
|
@ -2,10 +2,8 @@ import classNames from 'classnames';
|
||||
|
||||
import type { ValidateStatus } from '../form/FormItem';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const InputStatuses = ['warning', 'error', ''] as const;
|
||||
|
||||
export type InputStatus = (typeof InputStatuses)[number];
|
||||
const _InputStatuses = ['warning', 'error', ''] as const;
|
||||
export type InputStatus = (typeof _InputStatuses)[number];
|
||||
|
||||
export function getStatusClassNames(
|
||||
prefixCls: string,
|
||||
|
@ -77,7 +77,6 @@ export const devUseWarning: (component: string) => TypeWarning =
|
||||
|
||||
// Warning for the first time
|
||||
if (!existWarning) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
'[antd] There exists deprecated usage in your code:',
|
||||
deprecatedWarnList,
|
||||
|
@ -219,7 +219,6 @@ const Alert = React.forwardRef<AlertRef, AlertProps>((props, ref) => {
|
||||
const mergedAriaProps = React.useMemo<React.AriaAttributes>(() => {
|
||||
const merged = closable ?? alert?.closable;
|
||||
if (typeof merged === 'object') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { closeIcon: _, ...ariaProps } = merged;
|
||||
return ariaProps;
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ describe('Alert', () => {
|
||||
const warnSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
expect(warnSpy).toHaveBeenCalledTimes(0);
|
||||
// @ts-expect-error
|
||||
// eslint-disable-next-line react/jsx-no-undef
|
||||
const ThrowError = () => <NotExisted />;
|
||||
render(
|
||||
<ErrorBoundary>
|
||||
|
@ -78,8 +78,8 @@ describe('AutoComplete', () => {
|
||||
);
|
||||
expect(screen.getByRole('combobox')).toBeInTheDocument();
|
||||
await userEvent.type(screen.getByRole('combobox'), '1');
|
||||
expect(screen.getByTitle(/111/i)).toBeInTheDocument();
|
||||
expect(screen.getByTitle(/222/i)).toBeInTheDocument();
|
||||
expect(screen.getByTitle(/111/)).toBeInTheDocument();
|
||||
expect(screen.getByTitle(/222/)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should not warning when getInputElement is null', () => {
|
||||
|
@ -232,7 +232,6 @@ describe('Button', () => {
|
||||
it('should merge text if children using variable', () => {
|
||||
const wrapper = render(
|
||||
<Button>
|
||||
{/* eslint-disable-next-line react/jsx-curly-brace-presence */}
|
||||
This {'is'} a test {1}
|
||||
</Button>,
|
||||
);
|
||||
@ -330,7 +329,6 @@ describe('Button', () => {
|
||||
it('should handle fragment as children', () => {
|
||||
const wrapper = render(
|
||||
<Button>
|
||||
{/* eslint-disable-next-line react/jsx-no-useless-fragment */}
|
||||
<>text</>
|
||||
</Button>,
|
||||
);
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable react/button-has-type */
|
||||
import React, { Children, createRef, useContext, useEffect, useMemo, useState } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import omit from 'rc-util/lib/omit';
|
||||
|
@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { cloneElement, isFragment } from '../_util/reactNode';
|
||||
import type { BaseButtonProps, LegacyButtonType } from './button';
|
||||
|
||||
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
||||
const rxTwoCNChar = /^[\u4E00-\u9FA5]{2}$/;
|
||||
export const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
||||
|
||||
export function convertLegacyProps(
|
||||
@ -75,20 +75,16 @@ export function spaceChildren(children: React.ReactNode, needInserted: boolean)
|
||||
);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'] as const;
|
||||
export type ButtonType = (typeof ButtonTypes)[number];
|
||||
const _ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'] as const;
|
||||
export type ButtonType = (typeof _ButtonTypes)[number];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const ButtonShapes = ['default', 'circle', 'round'] as const;
|
||||
export type ButtonShape = (typeof ButtonShapes)[number];
|
||||
const _ButtonShapes = ['default', 'circle', 'round'] as const;
|
||||
export type ButtonShape = (typeof _ButtonShapes)[number];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const ButtonHTMLTypes = ['submit', 'button', 'reset'] as const;
|
||||
export type ButtonHTMLType = (typeof ButtonHTMLTypes)[number];
|
||||
const _ButtonHTMLTypes = ['submit', 'button', 'reset'] as const;
|
||||
export type ButtonHTMLType = (typeof _ButtonHTMLTypes)[number];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const ButtonVariantTypes = [
|
||||
export const _ButtonVariantTypes = [
|
||||
'outlined',
|
||||
'dashed',
|
||||
'solid',
|
||||
@ -96,8 +92,7 @@ export const ButtonVariantTypes = [
|
||||
'text',
|
||||
'link',
|
||||
] as const;
|
||||
export type ButtonVariantType = (typeof ButtonVariantTypes)[number];
|
||||
export type ButtonVariantType = (typeof _ButtonVariantTypes)[number];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const ButtonColorTypes = ['default', 'primary', 'danger'] as const;
|
||||
export type ButtonColorType = (typeof ButtonColorTypes)[number];
|
||||
export const _ButtonColorTypes = ['default', 'primary', 'danger'] as const;
|
||||
export type ButtonColorType = (typeof _ButtonColorTypes)[number];
|
||||
|
@ -202,7 +202,7 @@ describe('Calendar', () => {
|
||||
|
||||
it('Calendar should support locale', () => {
|
||||
MockDate.set(Dayjs('2018-10-19').valueOf());
|
||||
// eslint-disable-next-line global-require
|
||||
|
||||
const zhCN = require('../locale/zh_CN').default;
|
||||
const wrapper = render(<Calendar locale={zhCN} />);
|
||||
expect(wrapper.container.children[0]).toMatchSnapshot();
|
||||
@ -211,9 +211,9 @@ describe('Calendar', () => {
|
||||
|
||||
it('Calendar locale support should override ConfigProvider locale', () => {
|
||||
MockDate.set(Dayjs('2018-10-19').valueOf());
|
||||
// eslint-disable-next-line global-require
|
||||
|
||||
const zhCN = require('../locale/zh_CN').default;
|
||||
// eslint-disable-next-line global-require
|
||||
|
||||
const enUs = require('../../locale/en_US').default;
|
||||
const wrapper = render(
|
||||
<ConfigProvider locale={enUs}>
|
||||
|
@ -97,7 +97,6 @@ describe('Carousel', () => {
|
||||
|
||||
describe('should works for dotPosition', () => {
|
||||
(['left', 'right', 'top', 'bottom'] as const).forEach((dotPosition) => {
|
||||
// eslint-disable-next-line jest/valid-title
|
||||
it(dotPosition, () => {
|
||||
const { container } = render(
|
||||
<Carousel dotPosition={dotPosition}>
|
||||
|
@ -147,7 +147,7 @@ const InternalCheckbox: React.ForwardRefRenderFunction<CheckboxRef, CheckboxProp
|
||||
const ariaChecked = indeterminate ? 'mixed' : undefined;
|
||||
return wrapCSSVar(
|
||||
<Wave component="Checkbox" disabled={mergedDisabled}>
|
||||
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
|
||||
{}
|
||||
<label
|
||||
className={classString}
|
||||
style={{ ...checkbox?.style, ...style }}
|
||||
|
@ -4,7 +4,6 @@ import { resetWarned } from '../../_util/warning';
|
||||
import { act, fireEvent, render, waitFakeTimer } from '../../../tests/utils';
|
||||
|
||||
describe('Collapse', () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const Collapse = require('..').default;
|
||||
|
||||
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
|
@ -1,10 +1,9 @@
|
||||
/* eslint-disable class-methods-use-this */
|
||||
import { Color as RcColor } from '@rc-component/color-picker';
|
||||
|
||||
import type { ColorGenInput, Colors } from './interface';
|
||||
|
||||
export const toHexFormat = (value?: string, alpha?: boolean) =>
|
||||
value?.replace(/[^\w/]/gi, '').slice(0, alpha ? 8 : 6) || '';
|
||||
value?.replace(/[^\w/]/g, '').slice(0, alpha ? 8 : 6) || '';
|
||||
|
||||
export const getHex = (value?: string, alpha?: boolean) => (value ? toHexFormat(value, alpha) : '');
|
||||
|
||||
|
@ -9,7 +9,6 @@ import Button from '../../button';
|
||||
|
||||
describe('ConfigProvider.Icon', () => {
|
||||
beforeEach(() => {
|
||||
// eslint-disable-next-line jest/no-standalone-expect
|
||||
expect(document.querySelectorAll('style')).toHaveLength(0);
|
||||
});
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
/* eslint-disable import/prefer-default-export, prefer-destructuring */
|
||||
|
||||
import { generate } from '@ant-design/colors';
|
||||
import { TinyColor } from '@ctrl/tinycolor';
|
||||
import canUseDom from 'rc-util/lib/Dom/canUseDom';
|
||||
|
@ -1,2 +1 @@
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export { useResetIconStyle as default } from '../../theme/internal';
|
||||
|
@ -18,7 +18,6 @@ const range = (start: number, end: number) => {
|
||||
return result;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line arrow-body-style
|
||||
const disabledDate: RangePickerProps['disabledDate'] = (current) => {
|
||||
// Can not select days before today and today
|
||||
return current && current < dayjs().endOf('day');
|
||||
|
@ -58,9 +58,7 @@ const useStyle = createStyles(({ token }) => ({
|
||||
`,
|
||||
}));
|
||||
|
||||
const seeds = Array(30)
|
||||
.fill(1)
|
||||
.map(() => Math.random());
|
||||
const seeds = new Array(30).fill(1).map(() => Math.random());
|
||||
|
||||
const getSales = (date: Dayjs) => Math.floor(seeds[date.date() % 30] * 10000);
|
||||
|
||||
|
@ -11,10 +11,9 @@ import type { SizeType } from '../../config-provider/SizeContext';
|
||||
import type { Variant } from '../../config-provider';
|
||||
import type { TimePickerLocale } from '../../time-picker';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
|
||||
const _DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
|
||||
|
||||
type DataPickerPlacement = (typeof DataPickerPlacements)[number];
|
||||
type DataPickerPlacement = (typeof _DataPickerPlacements)[number];
|
||||
|
||||
export type PickerLocale = {
|
||||
lang: RcPickerLocale & AdditionalPickerLocaleLangProps;
|
||||
|
@ -37,7 +37,6 @@ describe('Descriptions', () => {
|
||||
});
|
||||
|
||||
it('when max-width: 575px, column=2', () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const wrapper = render(
|
||||
<Descriptions column={{ xs: 2 }}>
|
||||
<Descriptions.Item label="Product">Cloud Database</Descriptions.Item>
|
||||
@ -51,7 +50,6 @@ describe('Descriptions', () => {
|
||||
});
|
||||
|
||||
it('when max-width: 575px, column=2, span=2', () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const { container } = render(
|
||||
<Descriptions
|
||||
column={{ xs: 2 }}
|
||||
@ -81,7 +79,6 @@ describe('Descriptions', () => {
|
||||
});
|
||||
|
||||
it('column is number', () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const wrapper = render(
|
||||
<Descriptions column={3}>
|
||||
<Descriptions.Item label="Product">Cloud Database</Descriptions.Item>
|
||||
@ -146,7 +143,6 @@ describe('Descriptions', () => {
|
||||
});
|
||||
|
||||
it('vertical layout', () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const wrapper = render(
|
||||
<Descriptions layout="vertical">
|
||||
<Descriptions.Item label="Product">Cloud Database</Descriptions.Item>
|
||||
|
@ -16,9 +16,8 @@ import type { DrawerClassNames, DrawerPanelProps, DrawerStyles } from './DrawerP
|
||||
import DrawerPanel from './DrawerPanel';
|
||||
import useStyle from './style';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const SizeTypes = ['default', 'large'] as const;
|
||||
type sizeType = (typeof SizeTypes)[number];
|
||||
const _SizeTypes = ['default', 'large'] as const;
|
||||
type sizeType = (typeof _SizeTypes)[number];
|
||||
|
||||
export interface PushState {
|
||||
distance: string | number;
|
||||
|
@ -22,8 +22,7 @@ import { OverrideProvider } from '../menu/OverrideContext';
|
||||
import { useToken } from '../theme/internal';
|
||||
import useStyle from './style';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const Placements = [
|
||||
const _Placements = [
|
||||
'topLeft',
|
||||
'topCenter',
|
||||
'topRight',
|
||||
@ -34,7 +33,7 @@ const Placements = [
|
||||
'bottom',
|
||||
] as const;
|
||||
|
||||
type Placement = (typeof Placements)[number];
|
||||
type Placement = (typeof _Placements)[number];
|
||||
type DropdownPlacement = Exclude<Placement, 'topCenter' | 'bottomCenter'>;
|
||||
|
||||
type OverlayFunc = () => React.ReactElement;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable react/button-has-type */
|
||||
import React, { useContext, useMemo } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import omit from 'rc-util/lib/omit';
|
||||
|
@ -31,9 +31,8 @@ interface FieldError {
|
||||
warnings: string[];
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const ValidateStatuses = ['success', 'warning', 'error', 'validating', ''] as const;
|
||||
export type ValidateStatus = (typeof ValidateStatuses)[number];
|
||||
const _ValidateStatuses = ['success', 'warning', 'error', 'validating', ''] as const;
|
||||
export type ValidateStatus = (typeof _ValidateStatuses)[number];
|
||||
|
||||
type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
|
||||
type RcFieldProps<Values = any> = Omit<FieldProps<Values>, 'children'>;
|
||||
|
@ -710,7 +710,6 @@ describe('Form', () => {
|
||||
</Form>,
|
||||
);
|
||||
|
||||
/* eslint-disable no-await-in-loop */
|
||||
for (let i = 0; i < 3; i += 1) {
|
||||
await changeValue(0, 'bamboo');
|
||||
await changeValue(0, '');
|
||||
@ -721,7 +720,6 @@ describe('Form', () => {
|
||||
await changeValue(0, 'p');
|
||||
expect(container.querySelector('.ant-form-item-explain')?.textContent).toEqual('not a p');
|
||||
}
|
||||
/* eslint-enable */
|
||||
});
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/20813
|
||||
@ -1025,7 +1023,6 @@ describe('Form', () => {
|
||||
it('validation message should has alert role', async () => {
|
||||
// https://github.com/ant-design/ant-design/issues/25711
|
||||
const { container } = render(
|
||||
// eslint-disable-next-line no-template-curly-in-string
|
||||
<Form validateMessages={{ required: 'name is good!' }}>
|
||||
<Form.Item name="test" rules={[{ required: true }]}>
|
||||
<input />
|
||||
@ -1067,7 +1064,7 @@ describe('Form', () => {
|
||||
|
||||
for (let i = 0; i < 5; i += 1) {
|
||||
fireEvent.click(container.querySelector('button')!);
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
|
||||
await waitFakeTimer();
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ describe('Form.List', () => {
|
||||
{(fields, { add, remove }) => (
|
||||
<>
|
||||
{fields.map((field) => (
|
||||
/* biome-ignore lint/correctness/useJsxKeyInIterable: key is in a field */ /* eslint-disable-next-line react/jsx-key */
|
||||
/* biome-ignore lint/correctness/useJsxKeyInIterable: key is in a field */ /* eslint-disable-next-line react/no-missing-key */
|
||||
<Form.Item {...field}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
@ -6,7 +6,6 @@ const layout = {
|
||||
wrapperCol: { span: 16 },
|
||||
};
|
||||
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
const validateMessages = {
|
||||
required: '${label} is required!',
|
||||
types: {
|
||||
@ -17,7 +16,6 @@ const validateMessages = {
|
||||
range: '${label} must be between ${min} and ${max}',
|
||||
},
|
||||
};
|
||||
/* eslint-enable no-template-curly-in-string */
|
||||
|
||||
const onFinish = (values: any) => {
|
||||
console.log(values);
|
||||
|
@ -8,10 +8,8 @@ import RowContext from './RowContext';
|
||||
import type { RowContextState } from './RowContext';
|
||||
import { useRowStyle } from './style';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const RowAligns = ['top', 'middle', 'bottom', 'stretch'] as const;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const RowJustify = [
|
||||
const _RowAligns = ['top', 'middle', 'bottom', 'stretch'] as const;
|
||||
const _RowJustify = [
|
||||
'start',
|
||||
'end',
|
||||
'center',
|
||||
@ -28,12 +26,12 @@ type ResponsiveLike<T> = {
|
||||
type Gap = number | undefined;
|
||||
export type Gutter = number | undefined | Partial<Record<Breakpoint, number>>;
|
||||
|
||||
type ResponsiveAligns = ResponsiveLike<(typeof RowAligns)[number]>;
|
||||
type ResponsiveJustify = ResponsiveLike<(typeof RowJustify)[number]>;
|
||||
type ResponsiveAligns = ResponsiveLike<(typeof _RowAligns)[number]>;
|
||||
type ResponsiveJustify = ResponsiveLike<(typeof _RowJustify)[number]>;
|
||||
export interface RowProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
gutter?: Gutter | [Gutter, Gutter];
|
||||
align?: (typeof RowAligns)[number] | ResponsiveAligns;
|
||||
justify?: (typeof RowJustify)[number] | ResponsiveJustify;
|
||||
align?: (typeof _RowAligns)[number] | ResponsiveAligns;
|
||||
justify?: (typeof _RowJustify)[number] | ResponsiveJustify;
|
||||
prefixCls?: string;
|
||||
wrap?: boolean;
|
||||
}
|
||||
|
@ -238,7 +238,6 @@ exports[`renders components/icon/demo/custom.tsx extend context correctly 1`] =
|
||||
aria-hidden="true"
|
||||
aria-label="home"
|
||||
class="anticon anticon-home"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
role="img"
|
||||
@ -302,7 +301,6 @@ exports[`renders components/icon/demo/iconfont.tsx extend context correctly 1`]
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -323,7 +321,6 @@ exports[`renders components/icon/demo/iconfont.tsx extend context correctly 1`]
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -344,7 +341,6 @@ exports[`renders components/icon/demo/iconfont.tsx extend context correctly 1`]
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -374,7 +370,6 @@ exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`]
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -395,7 +390,6 @@ exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`]
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -416,7 +410,6 @@ exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`]
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -437,7 +430,6 @@ exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`]
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
|
@ -236,7 +236,6 @@ exports[`renders components/icon/demo/custom.tsx correctly 1`] = `
|
||||
aria-hidden="true"
|
||||
aria-label="home"
|
||||
class="anticon anticon-home"
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
role="img"
|
||||
@ -298,7 +297,6 @@ exports[`renders components/icon/demo/iconfont.tsx correctly 1`] = `
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -319,7 +317,6 @@ exports[`renders components/icon/demo/iconfont.tsx correctly 1`] = `
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -340,7 +337,6 @@ exports[`renders components/icon/demo/iconfont.tsx correctly 1`] = `
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -368,7 +364,6 @@ exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -389,7 +384,6 @@ exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -410,7 +404,6 @@ exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
@ -431,7 +424,6 @@ exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class=""
|
||||
fill="currentColor"
|
||||
focusable="false"
|
||||
height="1em"
|
||||
width="1em"
|
||||
|
@ -118,7 +118,7 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
||||
|
||||
const [variant, enableVariantCls] = useVariant('inputNumber', customVariant, bordered);
|
||||
|
||||
/* biome-ignore lint/complexity/noUselessFragments: avoid falsy value */ /* eslint-disable-next-line react/jsx-no-useless-fragment */
|
||||
/* biome-ignore lint/complexity/noUselessFragments: avoid falsy value */
|
||||
const suffixNode = hasFeedback && <>{feedbackIcon}</>;
|
||||
|
||||
const inputNumberClass = classNames(
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import type { InputProps, InputRef } from '..';
|
||||
import Input from '..';
|
||||
import { resetWarned } from '../../_util/warning';
|
||||
|
@ -2,7 +2,6 @@ import type { ReactNode } from 'react';
|
||||
|
||||
import type { InputProps } from './Input';
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export function hasPrefixSuffix(props: {
|
||||
prefix?: ReactNode;
|
||||
suffix?: ReactNode;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable react/no-multi-comp */
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import 'dayjs/locale/ar';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/ar_EG';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/az_AZ';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/bn_BD';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/by_BY';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/ca_ES';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/cs_CZ';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/de_DE';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/en_GB';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/en_US';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/es_ES';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
import Pagination from 'rc-pagination/lib/locale/et_EE';
|
||||
|
||||
import type { Locale } from '.';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user