feat(react19-migration): 阶段1 - 项目基础设施重建
- T1.1: 卸载 Vue 依赖,安装 React 19 + Ant Design 5 + Zustand 5 + AntV 全家桶 - T1.2: Vite 配置迁移 (plugin-vue → plugin-react, manualChunks 更新) - T1.3: TypeScript 配置迁移 (jsx: preserve → react-jsx, 移除 .vue) - T1.4: ESLint 配置迁移 (Vue 规则 → React/Hooks/Refresh 规则) - T1.5: 入口文件迁移 (main.ts → main.tsx, App.vue → App.tsx, div#app → div#root) 验证: npm run dev 成功启动空白 React 应用
This commit is contained in:
@@ -1,25 +1,26 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
node: true
|
||||
},
|
||||
env: { browser: true, es2020: true },
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:vue/vue3-recommended',
|
||||
'plugin:@typescript-eslint/recommended'
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:react/jsx-runtime',
|
||||
],
|
||||
parser: 'vue-eslint-parser',
|
||||
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
parser: '@typescript-eslint/parser',
|
||||
sourceType: 'module'
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: { jsx: true },
|
||||
},
|
||||
plugins: ['vue', '@typescript-eslint'],
|
||||
plugins: ['react-refresh'],
|
||||
rules: {
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
||||
'react/prop-types': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }]
|
||||
}
|
||||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||
},
|
||||
settings: { react: { version: 'detect' } },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user