diff --git a/components/alert/__tests__/index.test.tsx b/components/alert/__tests__/index.test.tsx index 11ee125e88..038985c21a 100644 --- a/components/alert/__tests__/index.test.tsx +++ b/components/alert/__tests__/index.test.tsx @@ -77,6 +77,7 @@ describe('Alert', () => { it('ErrorBoundary', () => { jest.spyOn(console, 'error').mockImplementation(() => undefined); + // eslint-disable-next-line no-console expect(console.error).toBeCalledTimes(0); // @ts-expect-error // eslint-disable-next-line react/jsx-no-undef diff --git a/components/cascader/__tests__/index.test.js b/components/cascader/__tests__/index.test.js index 479d654178..d953665a45 100644 --- a/components/cascader/__tests__/index.test.js +++ b/components/cascader/__tests__/index.test.js @@ -327,14 +327,15 @@ describe('Cascader', () => { }); // FIXME: Move to `rc-tree-select` instead - // it('should warning if not find `value` in `options`', () => { - // const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); - // mount(); - // expect(errorSpy).toHaveBeenCalledWith( - // 'Warning: [antd: Cascader] Not found `value` in `options`.', - // ); - // errorSpy.mockRestore(); - // }); + // eslint-disable-next-line jest/no-disabled-tests + it.skip('should warning if not find `value` in `options`', () => { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + mount(); + expect(errorSpy).toHaveBeenCalledWith( + 'Warning: [antd: Cascader] Not found `value` in `options`.', + ); + errorSpy.mockRestore(); + }); // https://github.com/ant-design/ant-design/issues/17690 it('should not breaks when children is null', () => { diff --git a/components/config-provider/__tests__/components.test.js b/components/config-provider/__tests__/components.test.js index 562f994568..85eb188909 100644 --- a/components/config-provider/__tests__/components.test.js +++ b/components/config-provider/__tests__/components.test.js @@ -60,7 +60,6 @@ jest.mock('rc-util/lib/Portal'); describe('ConfigProvider', () => { describe('components', () => { function testPair(name, renderComponent) { - // eslint-disable-next-line jest/valid-describe describe(`${name}`, () => { // normal it('normal', () => { diff --git a/package.json b/package.json index 28ed85798e..963edc90bb 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "rc-rate": "~2.9.0", "rc-resize-observer": "^1.0.0", "rc-select": "~13.1.0-alpha.0", - "rc-slider": "~9.7.1", + "rc-slider": "~9.7.4", "rc-steps": "~4.1.0", "rc-switch": "~3.2.0", "rc-table": "~7.18.0", @@ -204,7 +204,7 @@ "eslint-plugin-babel": "^5.3.0", "eslint-plugin-compat": "^3.9.0", "eslint-plugin-import": "^2.21.1", - "eslint-plugin-jest": "^24.0.1", + "eslint-plugin-jest": "^25.0.1", "eslint-plugin-jsx-a11y": "^6.2.1", "eslint-plugin-markdown": "^2.0.0", "eslint-plugin-react": "^7.20.6", diff --git a/scripts/css-variable-sync.js b/scripts/css-variable-sync.js index c0749a56b2..f46cb13c16 100644 --- a/scripts/css-variable-sync.js +++ b/scripts/css-variable-sync.js @@ -218,4 +218,5 @@ replaceVariable('alert-error-bg-color', '@error-color-deprecated-bg'); fse.writeFileSync(targetPath, variableContent, 'utf8'); +// eslint-disable-next-line no-console console.log(chalk.green('Success! Replaced path:'), targetPath); diff --git a/tests/shared/excludeWarning.tsx b/tests/shared/excludeWarning.tsx index 0aa24c5ee1..f619e50526 100644 --- a/tests/shared/excludeWarning.tsx +++ b/tests/shared/excludeWarning.tsx @@ -1,3 +1,4 @@ +// eslint-disable-next-line no-console const originError = console.error; /** This function will remove `useLayoutEffect` server side warning. Since it's useless. */ diff --git a/webpack.config.js b/webpack.config.js index d7fda02373..31ee02bcc2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -92,6 +92,7 @@ function processWebpackThemeConfig(themeConfig, theme, vars) { if (originPath.length === 1 && originPath[0] === './index') { replacedPath = ['./index-style-only']; } else { + // eslint-disable-next-line no-console console.log(chalk.red('🆘 Seems entry has changed! It should be `./index`')); }