Skip to content

Commit

Permalink
👷 add prettier:check (#2707)
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add authored Oct 8, 2023
1 parent 6cf4d89 commit 0f4d872
Show file tree
Hide file tree
Showing 35 changed files with 156 additions and 165 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ assignees: ''
## 最小可复现仓库

为节约大家的时间,无复现步骤的 ISSUE 会被关闭,提供之后再 REOPEN

<!-- https://github.com/YOUR_REPOSITORY_URL -->

## 复现步骤,错误日志以及相关配置
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache: "pnpm"

- run: corepack enable # https://nodejs.org/api/corepack.html
- run: pnpm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/emoji-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
steps:
- uses: actions-cool/[email protected]
with:
type: 'release'
emoji: '+1, laugh, heart, hooray, rocket, eyes'
type: "release"
emoji: "+1, laugh, heart, hooray, rocket, eyes"
4 changes: 2 additions & 2 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: "14"
check-latest: true
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"
- name: build
run: |
yarn
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/issue-close-inactive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- name: close inactive issue without reprodction
uses: actions-cool/[email protected]
with:
actions: 'close-issues'
labels: 'Need Reproduction'
actions: "close-issues"
labels: "Need Reproduction"
inactive-day: 30
body: |
Since the issue was labeled with `Need Reproduction`, but no response in 30 days. This issue will be close. If you have any questions, you can comment and reply.
Expand All @@ -21,8 +21,8 @@ jobs:
- name: close inactive issue not use template
uses: actions-cool/[email protected]
with:
actions: 'close-issues'
labels: 'pls use issue template'
actions: "close-issues"
labels: "pls use issue template"
inactive-day: 30
body: |
Since the issue was labeled with `pls use issue template`, but no response in 30 days. This issue will be close. If you have any questions, you can comment and reply.
Expand All @@ -31,8 +31,8 @@ jobs:
- name: close inactive issue out of scope
uses: actions-cool/[email protected]
with:
actions: 'close-issues'
labels: 'out-of-scope'
actions: "close-issues"
labels: "out-of-scope"
inactive-day: 30
body: |
Since the issue was labeled with `out-of-scope`, but no response in 30 days. This issue will be close. If you have any questions, you can comment and reply.
Expand All @@ -41,8 +41,8 @@ jobs:
- name: close inactive issue
uses: actions-cool/[email protected]
with:
actions: 'close-issues'
labels: 'inactive'
actions: "close-issues"
labels: "inactive"
inactive-day: 7
body: |
Since the issue was labeled with `inactive`, but no response in 7 days. This issue will be close. If you have any questions, you can comment and reply.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issue-reply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.event.label.name == 'pr welcome' || github.event.label.name == 'help wanted'
uses: actions-cool/[email protected]
with:
actions: 'create-comment'
actions: "create-comment"
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
Expand All @@ -23,7 +23,7 @@ jobs:
if: github.event.label.name == 'pls use issue template'
uses: actions-cool/[email protected]
with:
actions: 'create-comment, close-issue'
actions: "create-comment, close-issue"
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. To save both time, please use the issue template to report. This issue will be closed.
Expand All @@ -34,7 +34,7 @@ jobs:
if: github.event.label.name == 'Need Reproduction'
uses: actions-cool/[email protected]
with:
actions: 'create-comment'
actions: "create-comment"
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link [codesandbox](https://codesandbox.io/) or clone [qiankun examples](https://github.com/umijs/qiankun/tree/master/examples) to your GitHub repository.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/now.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
vercel-org-id: ${{ secrets.NOW_ORG_ID }}
vercel-project-id: ${{ secrets.NOW_PROJECT_ID }}
working-directory: dist
vercel-args: '--prod'
vercel-args: "--prod"
scope: umijs
5 changes: 2 additions & 3 deletions .github/workflows/publish-1.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ on:

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: "14.x"
check-latest: true
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- run: yarn
- run: yarn publish --tag qiankun1
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/publish-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ on:

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: "14.x"
check-latest: true
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- run: yarn
- run: yarn publish --tag latest
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
/coverage
.cache
examples

.changeset/*
pnpm-lock.yaml
packages/sandbox/src/core/sandbox/globals.ts
9 changes: 5 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"editorconfig": true,
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "never",
"overrides": [
{
"files": ["*.json", ".prettierrc"],
"options": {
"parser": "json"
}
"options": { "parser": "json" }
},
{
"files": ["*.{yaml,yml}"],
"options": { "singleQuote": false }
}
]
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ And on top of these, it offers:

## Packages

| Package | Version (click for changelogs) |
|----------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
| [qiankun](packages/qiankun) | [![qiankun version](https://img.shields.io/npm/v/qiankun/next.svg?label=%20)](packages/qiankun/CHANGELOG.md) |
| [@qiankunjs/loader](packages/loader) | [![qiankun version](https://img.shields.io/npm/v/@qiankunjs/loader/alpha.svg?label=%20)](packages/qiankun/CHANGELOG.md) |
| Package | Version (click for changelogs) |
| --- | :-- |
| [qiankun](packages/qiankun) | [![qiankun version](https://img.shields.io/npm/v/qiankun/next.svg?label=%20)](packages/qiankun/CHANGELOG.md) |
| [@qiankunjs/loader](packages/loader) | [![qiankun version](https://img.shields.io/npm/v/@qiankunjs/loader/alpha.svg?label=%20)](packages/qiankun/CHANGELOG.md) |
| [@qiankunjs/sandbox](packages/sandbox) | [![qiankun version](https://img.shields.io/npm/v/@qiankunjs/sandbox/alpha.svg?label=%20)](packages/qiankun/CHANGELOG.md) |

## 📦 Installation
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"release:alpha": "pnpm run build && changeset publish && changeset pre exit",
"lint": "eslint packages/",
"prettier": "prettier --write .",
"prettier:check": "prettier -c .",
"docs": "dumi dev",
"build-docs": "dumi build",
"ci": "pnpm run lint && pnpm run build",
"ci": "pnpm run lint && pnpm run prettier:check && pnpm run build",
"ci:publish": "pnpm run build && changeset publish",
"test": "cross-env NODE_ENV=test vitest",
"prepare": "husky install"
Expand Down
31 changes: 15 additions & 16 deletions packages/loader/benchmarks/parser/huge-html/import-html-entry.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>import html entry for huge html</title>
</head>
<body>
<head>
<meta charset="UTF-8" />
<title>import html entry for huge html</title>
</head>
<body>
<script type="module">
import * as bench from '/bench.js';
import processTpl from 'import-html-entry/esm/process-tpl.js';
import { hugeHtmlContent } from './huge-html.js';

<script type="module">
import * as bench from '/bench.js';
import processTpl from 'import-html-entry/esm/process-tpl.js';
import { hugeHtmlContent } from './huge-html.js';

bench.start();
processTpl(hugeHtmlContent, location.href);
bench.stop();
</script>
</body>
bench.start();
processTpl(hugeHtmlContent, location.href);
bench.stop();
</script>
</body>
</html>
31 changes: 15 additions & 16 deletions packages/loader/benchmarks/parser/huge-html/parser.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>parser for huge html</title>
</head>
<body>
<head>
<meta charset="UTF-8" />
<title>parser for huge html</title>
</head>
<body>
<script type="module">
import * as bench from '/bench.js';
import { parseHTML } from '../../../es/parser.js';
import { hugeHtmlContent } from './huge-html.js';

<script type="module">
import * as bench from '/bench.js';
import { parseHTML } from '../../../es/parser.js';
import { hugeHtmlContent } from './huge-html.js';

bench.start();
parseHTML(hugeHtmlContent, location.href);
bench.stop();
</script>
</body>
bench.start();
parseHTML(hugeHtmlContent, location.href);
bench.stop();
</script>
</body>
</html>
31 changes: 15 additions & 16 deletions packages/loader/benchmarks/parser/import-html-entry.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>import html entry for normal html</title>
</head>
<body>
<head>
<meta charset="UTF-8" />
<title>import html entry for normal html</title>
</head>
<body>
<script type="module">
import * as bench from '/bench.js';
import processTpl from 'import-html-entry/esm/process-tpl.js';
import { htmlContent } from './html.js';

<script type="module">
import * as bench from '/bench.js';
import processTpl from 'import-html-entry/esm/process-tpl.js';
import { htmlContent } from './html.js';

bench.start();
processTpl(htmlContent, location.href);
bench.stop();
</script>
</body>
bench.start();
processTpl(htmlContent, location.href);
bench.stop();
</script>
</body>
</html>
30 changes: 15 additions & 15 deletions packages/loader/benchmarks/parser/parser.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>parser for normal html</title>
</head>
<head>
<meta charset="UTF-8" />
<title>parser for normal html</title>
</head>

<body>
<script type="module">
import * as bench from '/bench.js';
import { parseHTML } from '../../es/parser.js';
import { htmlContent } from './html.js';
<body>
<script type="module">
import * as bench from '/bench.js';
import { parseHTML } from '../../es/parser.js';
import { htmlContent } from './html.js';

bench.start();
parseHTML(htmlContent, location.href);
bench.stop();
</script>
</body>
bench.start();
parseHTML(htmlContent, location.href);
bench.stop();
</script>
</body>
</html>
31 changes: 15 additions & 16 deletions packages/loader/benchmarks/parser/tern/import-html-entry.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>import html entry for normal html</title>
</head>
<body>
<head>
<meta charset="UTF-8" />
<title>import html entry for normal html</title>
</head>
<body>
<script type="module">
import * as bench from '/bench.js';
import processTpl from 'import-html-entry/esm/process-tpl.js';
import { htmlContent } from './html.js';

<script type="module">
import * as bench from '/bench.js';
import processTpl from 'import-html-entry/esm/process-tpl.js';
import { htmlContent } from './html.js';

bench.start();
processTpl(htmlContent, location.href);
bench.stop();
</script>
</body>
bench.start();
processTpl(htmlContent, location.href);
bench.stop();
</script>
</body>
</html>
Loading

0 comments on commit 0f4d872

Please sign in to comment.