Browse Source

Revert "feat: 添加TypeScript ESLint支持并扩展订单表单类型"

This reverts commit 8a510bc55daed52fe17b13de7efc73519641323d.
yz 1 week ago
parent
commit
940d792019
4 changed files with 151 additions and 1187 deletions
  1. 2 19
      .eslintrc.js
  2. 145 1157
      package-lock.json
  3. 1 6
      package.json
  4. 3 5
      src/components/order-form/types.d.ts

+ 2 - 19
.eslintrc.js

@@ -7,29 +7,12 @@ module.exports = {
     'plugin:vue/essential',
     'eslint:recommended'
   ],
-  plugins: ['@typescript-eslint'],
   rules: {
     'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
     "no-unused-vars":"off" //关闭声明后未被使用的变量或参数
   },
   parserOptions: {
-    parser: 'babel-eslint',
-    ecmaVersion: 2020,
-    sourceType: 'module'
-  },
-  overrides: [
-    {
-      files: ['*.ts', '*.tsx'],
-      parser: '@typescript-eslint/parser',
-      extends: [
-        'plugin:@typescript-eslint/recommended'
-      ],
-      parserOptions: {
-        ecmaVersion: 2020,
-        sourceType: 'module',
-        project: './tsconfig.json'
-      }
-    }
-  ]
+    parser: 'babel-eslint'
+  }
 }

File diff suppressed because it is too large
+ 145 - 1157
package-lock.json


+ 1 - 6
package.json

@@ -45,21 +45,16 @@
     "@babel/plugin-proposal-optional-chaining": "^7.21.0",
     "@types/axios": "^0.14.4",
     "@types/webpack-env": "^1.18.8",
-    "@typescript-eslint/eslint-plugin": "^5.62.0",
-    "@typescript-eslint/parser": "^5.62.0",
     "@vue/cli-plugin-babel": "^3.1.1",
     "@vue/cli-plugin-eslint": "^3.1.5",
     "@vue/cli-service": "^3.1.4",
     "chai": "^4.1.2",
-    "eslint": "^8.57.0",
-    "eslint-plugin-vue": "^9.0.0",
     "image-webpack-loader": "^8.1.0",
     "node-sass": "^4.12.0",
     "null-loader": "^4.0.1",
     "sass-loader": "^7.0.1",
     "ts-loader": "^8.4.0",
-    "typescript": "^5.1.6",
-    "vue-eslint-parser": "^9.0.0",
+    "typescript": "^5.9.2",
     "vue-template-compiler": "^2.5.17",
     "webpack-bundle-analyzer": "^3.0.3"
   },

+ 3 - 5
src/components/order-form/types.d.ts

@@ -69,8 +69,6 @@ export interface OrderFormModel {
   orgCode: string;
   /** 组织名称 */
   orgName: string;
-  /** 客户ID */
-  customerId: string | number | null;
   /** 客户编码 */
   customerCode: string;
   /** 客户名称 */
@@ -81,8 +79,6 @@ export interface OrderFormModel {
   totalAmount: number | null;
   /** 订单总数量 */
   totalQuantity: number | null;
-  /** 地址ID */
-  addressId: string | number | null;
   /** 收货人姓名 */
   receiverName: string;
   /** 收货人电话 */
@@ -98,7 +94,9 @@ export interface OrderFormModel {
 /**
  * 订单表单验证规则类型
  */
-export type OrderFormRules = Partial<Record<keyof OrderFormModel, ValidationRule[]>>;
+export type OrderFormRules = {
+  [K in keyof OrderFormModel]?: ValidationRule[];
+};
 
 /**
  * 下拉选择器选项接口

Some files were not shown because too many files changed in this diff