From 1782abcb2e8909109aad0daf475f00e258c3c225 Mon Sep 17 00:00:00 2001 From: zjx0905 <954270063@qq.com> Date: Mon, 27 Jul 2020 12:57:43 +0800 Subject: [PATCH] devops --- .travis.yml | 2 +- lint-staged.config.js | 2 +- package.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c03028..01df2f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,5 +7,5 @@ install: - yarn install script: - yarn prettier - - yarn lint + - yarn lint --fix - yarn coverage \ No newline at end of file diff --git a/lint-staged.config.js b/lint-staged.config.js index faa50bf..24ea254 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,3 +1,3 @@ module.exports = { - '*.{ts,tsx}': ['eslint --fix', 'git add'], + '*.{ts,tsx}': ['prettier', 'eslint --fix', 'git add'], }; diff --git a/package.json b/package.json index 0ee6405..953034d 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "build": "rollup -c", "lint": "eslint 'src/**/*.{js,ts,tsx}'", "format": "eslint --fix 'src/**/*.{js,ts,tsx}'", + "prettier": "prettier", "test": "jest", "test:watch": "yarn test -- --watch", "test:cov": "yarn test -- --coverage",