From d25772084a8c8092f401d99e131d764dbf1fe71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Mon, 6 May 2019 19:18:33 +0800 Subject: [PATCH] use check-prettier --- SearchListProjects/package.json | 2 +- TableList/package.json | 2 +- TableList/src/_mock.ts | 2 +- package.json | 8 +++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/SearchListProjects/package.json b/SearchListProjects/package.json index e61f9e39..2a77d035 100644 --- a/SearchListProjects/package.json +++ b/SearchListProjects/package.json @@ -27,4 +27,4 @@ "blockConfig": { "specVersion": "0.1" } -} \ No newline at end of file +} diff --git a/TableList/package.json b/TableList/package.json index a2293e52..9249ac84 100644 --- a/TableList/package.json +++ b/TableList/package.json @@ -26,4 +26,4 @@ "blockConfig": { "specVersion": "0.1" } -} \ No newline at end of file +} diff --git a/TableList/src/_mock.ts b/TableList/src/_mock.ts index f228acfa..918e7fb4 100644 --- a/TableList/src/_mock.ts +++ b/TableList/src/_mock.ts @@ -58,7 +58,7 @@ function getRule( if (params.status) { const status = params.status.split(','); let filterDataSource: TableListItem[] = []; - status.forEach(s => { + status.forEach((s: string) => { filterDataSource = filterDataSource.concat( dataSource.filter(item => { if (parseInt(item.status + '', 10) === parseInt(s.split('')[0], 10)) { diff --git a/package.json b/package.json index 23590f46..29bd845d 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "devDependencies": { "@types/classnames": "^2.2.7", "babel-eslint": "^10.0.1", + "check-prettier": "^1.0.1", "glob": "^7.1.3", "husky": "^2.2.0", "lint-staged": "^8.1.0", @@ -55,5 +56,10 @@ }, "peerDependencies": { "antd": "^3.17.0" - } + }, + "checkFiles": [ + "**/*.ts*", + "**/*.less", + "**/*.md" + ] } -- GitLab