From c6f777e8c2f55b971e911b9da7ece581f5f1d731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Wed, 22 May 2019 16:13:18 +0800 Subject: [PATCH] fix tslint error --- AccountCenter/src/data.d.ts | 2 +- AccountSettings/src/data.d.ts | 2 +- DashboardAnalysis/src/data.d.ts | 22 +++++++++---------- DashboardWorkplace/src/data.d.ts | 21 +++++++++--------- .../EditorItemPanel/FlowItemPanel.js | 4 ++-- .../components/PageHeaderWrapper/index.tsx | 3 +-- EditorFlow/src/index.tsx | 4 ++-- ListSearchArticles/src/data.d.ts | 4 ++-- ListSearchProjects/src/data.d.ts | 4 ++-- ListTableList/src/data.d.ts | 8 +++---- ProfileAdvanced/src/data.d.ts | 8 +++---- ProfileBasic/src/data.d.ts | 6 ++--- package.json | 5 ++--- 13 files changed, 45 insertions(+), 48 deletions(-) diff --git a/AccountCenter/src/data.d.ts b/AccountCenter/src/data.d.ts index e1af4bb7..0f4070e6 100644 --- a/AccountCenter/src/data.d.ts +++ b/AccountCenter/src/data.d.ts @@ -29,7 +29,7 @@ export interface INotice { memberLink: string; } -export interface currentuser { +export interface CurrentUser { name: string; avatar: string; userid: string; diff --git a/AccountSettings/src/data.d.ts b/AccountSettings/src/data.d.ts index e1af4bb7..0f4070e6 100644 --- a/AccountSettings/src/data.d.ts +++ b/AccountSettings/src/data.d.ts @@ -29,7 +29,7 @@ export interface INotice { memberLink: string; } -export interface currentuser { +export interface CurrentUser { name: string; avatar: string; userid: string; diff --git a/DashboardAnalysis/src/data.d.ts b/DashboardAnalysis/src/data.d.ts index df36ae20..20df2e20 100644 --- a/DashboardAnalysis/src/data.d.ts +++ b/DashboardAnalysis/src/data.d.ts @@ -1,19 +1,19 @@ -export interface ivisitdata { +export interface IVisitData { x: string; y: number; } -export interface ivisitdata2 { +export interface IVisitData2 { x: string; y: number; } -export interface isalesdata { +export interface ISalesData { x: string; y: number; } -export interface isearchdata { +export interface ISearchData { index: number; keyword: string; count: number; @@ -21,39 +21,39 @@ export interface isearchdata { status: number; } -export interface iofflinedata { +export interface IOfflineData { name: string; cvr: number; } -export interface iofflinechartdata { +export interface IOfflineChartData { x: any; y1: number; y2: number; } -export interface isalestypedata { +export interface ISalesTypeData { x: string; y: number; } -export interface isalestypedataonline { +export interface ISalesTypeDataOnline { x: string; y: number; } -export interface isalestypedataoffline { +export interface ISalesTypeDataOffline { x: string; y: number; } -export interface iradardata { +export interface IRadarData { name: string; label: string; value: number; } -export interface ianalysisdata { +export interface IAnalysisData { visitData: IVisitData[]; visitData2: IVisitData2[]; salesData: ISalesData[]; diff --git a/DashboardWorkplace/src/data.d.ts b/DashboardWorkplace/src/data.d.ts index 0de8d14d..8634a39c 100644 --- a/DashboardWorkplace/src/data.d.ts +++ b/DashboardWorkplace/src/data.d.ts @@ -1,24 +1,24 @@ -export interface itag { +export interface ITag { key: string; label: string; } -export interface iprovince { +export interface IProvince { label: string; key: string; } -export interface icity { +export interface ICity { label: string; key: string; } -export interface geographic { +export interface IGeographic { province: IProvince; city: ICity; } -export interface inotice { +export interface INotice { id: string; title: string; logo: string; @@ -29,7 +29,7 @@ export interface inotice { memberLink: string; } -export interface icurrentuser { +export interface ICurrentUser { name: string; avatar: string; userid: string; @@ -42,18 +42,17 @@ export interface icurrentuser { notifyCount: number; unreadCount: number; country: string; - geographic: Geographic; + geographic: IGeographic; address: string; phone: string; } - -export interface imember { +export interface IMember { avatar: string; name: string; id: string; } -export interface iactivities { +export interface IActivities { id: string; updatedAt: string; user: { @@ -72,7 +71,7 @@ export interface iactivities { template: string; } -export interface iradardata { +export interface IRadarData { label: string; name: string; value: number; diff --git a/EditorFlow/src/components/EditorItemPanel/FlowItemPanel.js b/EditorFlow/src/components/EditorItemPanel/FlowItemPanel.js index e6912793..234363d0 100644 --- a/EditorFlow/src/components/EditorItemPanel/FlowItemPanel.js +++ b/EditorFlow/src/components/EditorItemPanel/FlowItemPanel.js @@ -1,5 +1,5 @@ -import React from 'react'; -import { Card } from 'antd'; +import React from 'EditorFlow/node_modules/_@types_react@16.8.18@@types/react'; +import { Card } from 'EditorFlow/node_modules/_antd@3.18.2@antd/lib'; import { ItemPanel, Item } from 'gg-editor'; import styles from './index.less'; diff --git a/EditorFlow/src/components/PageHeaderWrapper/index.tsx b/EditorFlow/src/components/PageHeaderWrapper/index.tsx index bb565a04..18525c4b 100644 --- a/EditorFlow/src/components/PageHeaderWrapper/index.tsx +++ b/EditorFlow/src/components/PageHeaderWrapper/index.tsx @@ -1,8 +1,7 @@ import React from 'react'; -import { RouteContext } from '@ant-design/pro-layout'; +import { RouteContext, GridContent } from '@ant-design/pro-layout'; import { PageHeader, Tabs, Typography } from 'antd'; import styles from './index.less'; -import { GridContent } from '@ant-design/pro-layout'; import { TabsProps } from 'antd/lib/tabs'; interface IPageHeaderTabConfig { tabList?: Array<{ diff --git a/EditorFlow/src/index.tsx b/EditorFlow/src/index.tsx index d8dec88a..a323ffdf 100644 --- a/EditorFlow/src/index.tsx +++ b/EditorFlow/src/index.tsx @@ -1,5 +1,5 @@ -import React from 'react'; -import { Row, Col } from 'antd'; +import React from 'EditorFlow/node_modules/_@types_react@16.8.18@@types/react'; +import { Row, Col } from 'EditorFlow/node_modules/_antd@3.18.2@antd/lib'; import GGEditor, { Flow } from 'gg-editor'; import EditorMinimap from './components/EditorMinimap'; import { FlowContextMenu } from './components/EditorContextMenu'; diff --git a/ListSearchArticles/src/data.d.ts b/ListSearchArticles/src/data.d.ts index 51542b80..6a4a88ce 100644 --- a/ListSearchArticles/src/data.d.ts +++ b/ListSearchArticles/src/data.d.ts @@ -1,10 +1,10 @@ -export interface member { +export interface Member { avatar: string; name: string; id: string; } -export interface listitemdatatype { +export interface ListItemDataType { id: string; owner: string; title: string; diff --git a/ListSearchProjects/src/data.d.ts b/ListSearchProjects/src/data.d.ts index 51542b80..6a4a88ce 100644 --- a/ListSearchProjects/src/data.d.ts +++ b/ListSearchProjects/src/data.d.ts @@ -1,10 +1,10 @@ -export interface member { +export interface Member { avatar: string; name: string; id: string; } -export interface listitemdatatype { +export interface ListItemDataType { id: string; owner: string; title: string; diff --git a/ListTableList/src/data.d.ts b/ListTableList/src/data.d.ts index 6c3d1452..a4ae013d 100644 --- a/ListTableList/src/data.d.ts +++ b/ListTableList/src/data.d.ts @@ -1,4 +1,4 @@ -export interface tablelistitem { +export interface TableListItem { key: number; disabled?: boolean; href: string; @@ -14,18 +14,18 @@ export interface tablelistitem { progress: number; } -export interface tablelistpagination { +export interface TableListPagination { total: number; pageSize: number; current: number; } -export interface tablelistdate { +export interface TableListDate { list: TableListItem[]; pagination: Partial; } -export interface tablelistparams { +export interface TableListParams { sorter: string; status: string; name: string; diff --git a/ProfileAdvanced/src/data.d.ts b/ProfileAdvanced/src/data.d.ts index b640c834..64f7e78e 100644 --- a/ProfileAdvanced/src/data.d.ts +++ b/ProfileAdvanced/src/data.d.ts @@ -1,4 +1,4 @@ -export interface advancedoperation1 { +export interface AdvancedOperation1 { key: string; type: string; name: string; @@ -7,7 +7,7 @@ export interface advancedoperation1 { memo: string; } -export interface advancedoperation2 { +export interface AdvancedOperation2 { key: string; type: string; name: string; @@ -16,7 +16,7 @@ export interface advancedoperation2 { memo: string; } -export interface advancedoperation3 { +export interface AdvancedOperation3 { key: string; type: string; name: string; @@ -25,7 +25,7 @@ export interface advancedoperation3 { memo: string; } -export interface advancedprofiledata { +export interface AdvancedProfileData { advancedOperation1: AdvancedOperation1[]; advancedOperation2: AdvancedOperation2[]; advancedOperation3: AdvancedOperation3[]; diff --git a/ProfileBasic/src/data.d.ts b/ProfileBasic/src/data.d.ts index 76e67b3a..786f796d 100644 --- a/ProfileBasic/src/data.d.ts +++ b/ProfileBasic/src/data.d.ts @@ -1,4 +1,4 @@ -export interface basicgood { +export interface BasicGood { id: string; name: string; barcode: string; @@ -7,7 +7,7 @@ export interface basicgood { amount: string | number; } -export interface basicprogress { +export interface BasicProgress { key: string; time: string; rate: string; @@ -16,7 +16,7 @@ export interface basicprogress { cost: string; } -export interface basicprofiledatatype { +export interface BasicProfileDataType { basicGoods: BasicGood[]; basicProgress: BasicProgress[]; } diff --git a/package.json b/package.json index c5904c3d..b0927c90 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,12 @@ "lint": "npm run lint:ts && npm run lint:style && npm run lint:prettier", "lint-staged": "lint-staged", "lint-staged:ts": "tslint", - "lint:fix": "npm run tslint:fix && npm run lint:style", + "lint:fix": "npm run lint:style", "lint:prettier": "check-prettier write", "lint:style": "stylelint --syntax less --fix **/**.less ", "lint:ts": "tslint -p . -c tslint.yml", "prettier": "node ./_scripts/prettier.js", - "tslint": "npm run tslint:fix", - "tslint:fix": "tslint -p . -c tslint.yml --fix " + "tslint": "npm run tslint:fix" }, "husky": { "hooks": { -- GitLab