fix: update prettier

This commit is contained in:
yanglbme 2020-10-20 19:59:47 +08:00
parent 90d9b86fe6
commit 934163caec
2 changed files with 2 additions and 3 deletions

View File

@ -19,7 +19,7 @@ jobs:
- name: Prettify code - name: Prettify code
uses: creyD/prettier_action@v3.0 uses: creyD/prettier_action@v3.0
with: with:
prettier_options: --write **/*.{html,js,md} prettier_options: --write **/*.{html,js,md,vue,less,css}
commit_message: 'docs: prettify code' commit_message: 'docs: prettify code'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -3,7 +3,6 @@ import OSS from "ali-oss";
import COS from "cos-js-sdk-v5"; import COS from "cos-js-sdk-v5";
import Buffer from "buffer-from"; import Buffer from "buffer-from";
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { resolveConfigFile } from "prettier";
const defaultConfig = { const defaultConfig = {
username: "filess", username: "filess",
@ -98,7 +97,7 @@ async function ghFileUpload(content, filename) {
}, },
}); });
const githubResourceUrl = "raw.githubusercontent.com/filess/images/master/"; const githubResourceUrl = "raw.githubusercontent.com/filess/images/master/";
const cdnResourceUrl = "cdn.jsdelivr.net/gh/filess/images/"; const cdnResourceUrl = "cdn.jsdelivr.net/gh/filess/images@master/";
return isDefault return isDefault
? res.content.download_url.replace(githubResourceUrl, cdnResourceUrl) ? res.content.download_url.replace(githubResourceUrl, cdnResourceUrl)
: res.content.download_url; : res.content.download_url;