Skip to content

Commit

Permalink
style: 更改 prettier 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
KonghaYao committed Jul 29, 2021
1 parent 3875af7 commit f7c3895
Show file tree
Hide file tree
Showing 30 changed files with 6,723 additions and 5,253 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules/*
**/dist/*
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules/*
**/dist/*
13 changes: 12 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,16 @@
"singleQuote": true,
"semi": true,
"trailingComma": "all",
"bracketSpacing": true
"bracketSpacing": true,
"overrides": [
{
"files": [
"FakeServer/**/*.{ts,json,md,yml,js}",
"plugins/**/*.{ts,json,md,yml,js}",
"src/**/*.{ts,json,md,yml,js}",
"tools/**/*.{ts,json,md,yml,js}",
"docs/**/*.{md}"
]
}
]
}
10 changes: 10 additions & 0 deletions FakeServer/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"endOfLine": "auto",
"singleQuote": true,
"semi": true,
"trailingComma": "all",
"bracketSpacing": true
}
12 changes: 0 additions & 12 deletions FakeServer/ajax/DEMO.js

This file was deleted.

2 changes: 1 addition & 1 deletion FakeServer/ajax/fetch/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function fakeFetch(url, options = {}) {
// ! 传入初始参数
const result = await config.proxy(url, options);
if (result) {
if (!silent) console.warn('fetch: mock代理中');
if (!config.silent) console.warn('fetch: mock代理中');
const { body, options = {} } = result;
return new fakeResponse(body, options);
}
Expand Down
Loading

0 comments on commit f7c3895

Please sign in to comment.