From 9539c19b402561837dd2dc002dff534a4ee198b9 Mon Sep 17 00:00:00 2001 From: qiang Date: Fri, 13 Jun 2025 17:07:39 +0800 Subject: [PATCH] style(eslint-config): add rules to restrict the imports of element-plus (#20959) * style(eslint-config): add rules to restrict the imports of element-plus * chore: added validation for tsx files * chore: revert the shell --- docs/en-US/guide/dev-guide.md | 1 - docs/en-US/guide/transitions.md | 2 +- docs/examples/image/custom-toolbar.vue | 2 +- docs/examples/table-v2/dynamic-height.vue | 2 +- docs/examples/tree-v2/custom-node-class.vue | 5 +- docs/examples/tree-v2/filter.vue | 2 +- docs/examples/tree/checking-tree.vue | 4 +- docs/examples/tree/custom-leaf.vue | 4 +- docs/examples/tree/custom-node-class.vue | 5 +- docs/examples/tree/customized-node.vue | 70 ++++--- docs/examples/tree/draggable.vue | 7 +- docs/examples/tree/filtering.vue | 4 +- docs/examples/tree/multiple-times-load.vue | 8 +- docs/examples/tree/selectable.vue | 4 +- internal/eslint-config/index.js | 172 ++++++++++++++++++ .../__tests__/config-provider.test.tsx | 134 +++++++++++++- .../form}/__tests__/use-form-item.test.tsx | 14 +- packages/hooks/__tests__/use-locale.test.tsx | 26 +-- .../hooks/__tests__/use-namespace.test.tsx | 35 ++-- packages/hooks/use-focus-controller/index.ts | 3 +- 20 files changed, 384 insertions(+), 120 deletions(-) rename packages/{hooks => components/form}/__tests__/use-form-item.test.tsx (88%) diff --git a/docs/en-US/guide/dev-guide.md b/docs/en-US/guide/dev-guide.md index 1b425ef63c..3ce47c5bba 100644 --- a/docs/en-US/guide/dev-guide.md +++ b/docs/en-US/guide/dev-guide.md @@ -46,7 +46,6 @@ will start the local development environment. ``` diff --git a/docs/en-US/guide/transitions.md b/docs/en-US/guide/transitions.md index d8e8e0a9e9..d836548c2b 100644 --- a/docs/en-US/guide/transitions.md +++ b/docs/en-US/guide/transitions.md @@ -40,7 +40,7 @@ transitions/collapse // collapse import { ElCollapseTransition } from 'element-plus' // fade/zoom -import 'element-plus/lib/theme-chalk/base.css' +import 'element-plus/theme-chalk/base.css' import App from './App.vue' const app = createApp(App) diff --git a/docs/examples/image/custom-toolbar.vue b/docs/examples/image/custom-toolbar.vue index f5ed71880d..eea556063b 100644 --- a/docs/examples/image/custom-toolbar.vue +++ b/docs/examples/image/custom-toolbar.vue @@ -37,7 +37,7 @@