Explorar el Código

feat(types): eslint允许namespace

lipk hace 3 años
padre
commit
522c04da4b
Se han modificado 4 ficheros con 34 adiciones y 84 borrados
  1. 1 0
      types/.eslintrc.js
  2. 0 48
      types/src/api/approvaApi.ts
  3. 0 1
      types/src/api/index.ts
  4. 33 35
      types/src/interface/api/approvaApi.ts

+ 1 - 0
types/.eslintrc.js

@@ -37,5 +37,6 @@ module.exports = {
     'no-shadow': 'off',
     'no-shadow': 'off',
     '@typescript-eslint/no-shadow': 'error',
     '@typescript-eslint/no-shadow': 'error',
     'max-classes-per-file': 'off',
     'max-classes-per-file': 'off',
+    '@typescript-eslint/no-namespace': 'off',
   },
   },
 };
 };

+ 0 - 48
types/src/api/approvaApi.ts

@@ -1,48 +0,0 @@
-import { IGatherYsProfileFile, IMatterNode, UploadMsg } from "..";
-
-export namespace PostApprovalCopyGatherYsProfileFiles {
-
-    export type Params = {
-        fileDataList: {
-            name: string;
-            ext: string;
-            size: any;
-            path: string;
-            createTime: number;
-        }[];
-        gypID: string;
-    }
-
-    export interface Response {
-        fileList: IGatherYsProfileFile[];
-        count: number;
-    }
-
-}
-
-export namespace GetApprovalGetMatterData {
-    export type Params = {
-        businessID: string
-        // getAllMatter?: boolean // 是否获取全部matter
-    }
-
-    export type Response = Array<IMatterNode>
-}
-
-export namespace GetApprovalGetYsProfileTreeWithFile {
-    export type Params = { businessId: string; matterId: string }
-
-    export type Response = Array<IMatterNode>
-}
-
-export namespace GetApprovalGetGatherYsProfileByBusinessID {
-    export type Params = { businessID: string; matterID: string }
-
-    export type Response = {
-        tree: any[];
-        profileView: boolean;
-        uploadMsg: UploadMsg;
-        cadView: boolean;
-        copy: boolean
-    }
-}

+ 0 - 1
types/src/api/index.ts

@@ -1 +0,0 @@
-export * from './approvaApi';

+ 33 - 35
types/src/interface/api/approvaApi.ts

@@ -1,48 +1,46 @@
-import { IGatherYsProfileFile, IMatterNode, UploadMsg } from "..";
+import { IGatherYsProfileFile, IMatterNode, UploadMsg } from '..';
 
 
 export namespace PostApprovalCopyGatherYsProfileFiles {
 export namespace PostApprovalCopyGatherYsProfileFiles {
-
-    export type Params = {
-        fileDataList: {
-            name: string;
-            ext: string;
-            size: any;
-            path: string;
-            createTime: number;
-        }[];
-        gypID: string;
-    }
-
-    export interface Response {
-        fileList: IGatherYsProfileFile[];
-        count: number;
-    }
-
+  export type Params = {
+    fileDataList: {
+      name: string;
+      ext: string;
+      size: any;
+      path: string;
+      createTime: number;
+    }[];
+    gypID: string;
+  };
+
+  export interface Response {
+    fileList: IGatherYsProfileFile[];
+    count: number;
+  }
 }
 }
 
 
 export namespace GetApprovalGetMatterData {
 export namespace GetApprovalGetMatterData {
-    export type Params = {
-        businessID: string
-        getAllMatter?: boolean // 是否获取全部matter
-    }
+  export type Params = {
+    businessID: string;
+    getAllMatter?: boolean; // 是否获取全部matter
+  };
 
 
-    export type Response = Array<IMatterNode>
+  export type Response = Array<IMatterNode>;
 }
 }
 
 
 export namespace GetApprovalGetYsProfileTreeWithFile {
 export namespace GetApprovalGetYsProfileTreeWithFile {
-    export type Params = { businessId: string; matterId: string }
+  export type Params = { businessId: string; matterId: string };
 
 
-    export type Response = Array<IMatterNode>
+  export type Response = Array<IMatterNode>;
 }
 }
 
 
 export namespace GetApprovalGetGatherYsProfileByBusinessID {
 export namespace GetApprovalGetGatherYsProfileByBusinessID {
-    export type Params = { businessID: string; matterID: string }
-
-    export type Response = {
-        tree: any[];
-        profileView: boolean;
-        uploadMsg: UploadMsg;
-        cadView: boolean;
-        copy: boolean
-    }
-}
+  export type Params = { businessID: string; matterID: string };
+
+  export type Response = {
+    tree: any[];
+    profileView: boolean;
+    uploadMsg: UploadMsg;
+    cadView: boolean;
+    copy: boolean;
+  };
+}