Skip to content

Commit

Permalink
style: format html&markdown files (#11531)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz authored Aug 7, 2024
1 parent 7c75cc3 commit 8a99f90
Show file tree
Hide file tree
Showing 32 changed files with 1,451 additions and 1,319 deletions.
8 changes: 4 additions & 4 deletions .github/commit-convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ This reverts commit 667ecc1654a317a13331b17617d973392f415f02.

### Full Message Format

A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:

```
<type>(<scope>): <subject>
Expand Down Expand Up @@ -74,9 +74,9 @@ The scope could be anything specifying the place of the commit change. For examp

The subject contains a succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end

### Body

Expand Down
1 change: 0 additions & 1 deletion .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before

Another aspect of it is that large scale stylistic changes result in massive diffs that touch multiple files, adding noise to the git history and makes tracing behavior changes across commits more cumbersome.


### Pull Request Checklist

- Vue core has two primary work branches: `main` and `minor`.
Expand Down
1 change: 1 addition & 0 deletions .github/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Depending on the type of the PR, different considerations need to be taken into
- Make sure it doesn't accidentally cause dev-only or compiler-only code branches to be included in the runtime build. Notable case is that some functions in @vue/shared are compiler-only and should not be used in runtime code, e.g. `isHTMLTag` and `isSVGTag`.

- Performance

- Be careful about code changes in "hot paths", in particular the Virtual DOM renderer (`runtime-core/src/renderer.ts`) and component instantiation code.

- Potential Breakage
Expand Down
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dist
*.md
*.html
pnpm-lock.yaml
CHANGELOG*.md
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Please note that we do not consider XSS via template expressions a valid attack

We would like to thank the following security researchers for responsibly disclosing security issues to us.

- Jeet Pal - [@jeetpal2007](https://github.com/jeetpal2007) | [Email](jeetpal2007@gmail.com) | [LinkedIn](https://in.linkedin.com/in/jeet-pal-22601a290 )
- Jeet Pal - [@jeetpal2007](https://github.com/jeetpal2007) | [Email](jeetpal2007@gmail.com) | [LinkedIn](https://in.linkedin.com/in/jeet-pal-22601a290)
- Mix - [@mnixry](https://github.com/mnixry)
- Aviv Keller - [@RedYetiDev](https://github.com/redyetidev) | [LinkedIn](https://www.linkedin.com/in/redyetidev) <redyetidev@gmail.com>
2 changes: 1 addition & 1 deletion packages/compiler-dom/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# @vue/compiler-dom
# @vue/compiler-dom
2 changes: 1 addition & 1 deletion packages/compiler-ssr/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# @vue/compiler-ssr
# @vue/compiler-ssr
2 changes: 1 addition & 1 deletion packages/runtime-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { render, createApp } = createRenderer({
patchProp,
insert,
remove,
createElement
createElement,
// ...
})

Expand Down
4 changes: 2 additions & 2 deletions packages/runtime-dom/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# @vue/runtime-dom

``` js
```js
import { h, createApp } from '@vue/runtime-dom'

const RootComponent = {
render() {
return h('div', 'hello world')
}
},
}

createApp(RootComponent).mount('#app')
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is for Vue's own internal tests only - it ensures logic tested using this p

It can also be used as a reference for implementing a custom renderer.

``` js
```js
import { h, render, nodeOps, dumpOps } from '@vue/runtime-test'

const App = {
Expand Down
16 changes: 8 additions & 8 deletions packages/server-renderer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
```ts
function renderToString(
input: App | VNode,
context?: SSRContext
context?: SSRContext,
): Promise<string>
```

Expand All @@ -23,7 +23,7 @@ const { renderToString } = require('@vue/server-renderer')
const app = createSSRApp({
data: () => ({ msg: 'hello' }),
template: `<div>{{ msg }}</div>`
template: `<div>{{ msg }}</div>`,
})
;(async () => {
Expand Down Expand Up @@ -74,7 +74,7 @@ Render and pipe to an existing [Node.js Writable stream](https://nodejs.org/api/
function pipeToNodeWritable(
input: App | VNode,
context: SSRContext = {},
writable: Writable
writable: Writable,
): void
```

Expand All @@ -94,7 +94,7 @@ Renders input as a [Web ReadableStream](https://developer.mozilla.org/en-US/docs
```ts
function renderToWebStream(
input: App | VNode,
context?: SSRContext
context?: SSRContext,
): ReadableStream
```

Expand All @@ -117,7 +117,7 @@ Render and pipe to an existing [Web WritableStream](https://developer.mozilla.or
function pipeToWebWritable(
input: App | VNode,
context: SSRContext = {},
writable: WritableStream
writable: WritableStream,
): void
```

Expand All @@ -144,7 +144,7 @@ Renders input in streaming mode using a simple readable interface.
function renderToSimpleStream(
input: App | VNode,
context: SSRContext,
options: SimpleReadable
options: SimpleReadable,
): SimpleReadable
interface SimpleReadable {
Expand Down Expand Up @@ -172,7 +172,7 @@ renderToSimpleStream(
},
destroy(err) {
// error encountered
}
}
},
},
)
```
17 changes: 10 additions & 7 deletions packages/sfc-playground/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -7,13 +7,16 @@
<link rel="icon" type="image/svg" href="/logo.svg" />
<title>Vue SFC Playground</title>
<script>
const savedPreferDark = localStorage.getItem('vue-sfc-playground-prefer-dark')
if (
savedPreferDark === 'true' ||
(!savedPreferDark && window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
const savedPreferDark = localStorage.getItem(
'vue-sfc-playground-prefer-dark',
)
if (
savedPreferDark === 'true' ||
(!savedPreferDark &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.documentElement.classList.add('dark')
}
}
</script>
<script type="module" src="/src/main.ts"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion packages/sfc-playground/src/download/template/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
20 changes: 12 additions & 8 deletions packages/template-explorer/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<title>Vue Template Explorer</title>
<link rel="stylesheet" data-name="vs/editor/editor.main" href="https://unpkg.com/monaco-editor@0.20.0/min/vs/editor/editor.main.css">
<link rel="stylesheet" href="./style.css">
<link
rel="stylesheet"
data-name="vs/editor/editor.main"
href="https://unpkg.com/monaco-editor@0.20.0/min/vs/editor/editor.main.css"
/>
<link rel="stylesheet" href="./style.css" />

<div id="header"></div>
<div id="source" class="editor"></div>
<div id="output" class="editor"></div>

<script src="https://unpkg.com/monaco-editor@0.20.0/min/vs/loader.js"></script>
<script>
require.config({
paths: {
'vs': 'https://unpkg.com/monaco-editor@0.20.0/min/vs'
}
})
require.config({
paths: {
vs: 'https://unpkg.com/monaco-editor@0.20.0/min/vs',
},
})
</script>
<script src="./dist/template-explorer.global.js"></script>
<script>
require(['vs/editor/editor.main'], init /* injected by build */)
require(['vs/editor/editor.main'], init /* injected by build */)
</script>
20 changes: 12 additions & 8 deletions packages/template-explorer/local.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<title>Vue Template Explorer</title>
<link rel="stylesheet" data-name="vs/editor/editor.main" href="./node_modules/monaco-editor/min/vs/editor/editor.main.css">
<link rel="stylesheet" href="./style.css">
<link
rel="stylesheet"
data-name="vs/editor/editor.main"
href="./node_modules/monaco-editor/min/vs/editor/editor.main.css"
/>
<link rel="stylesheet" href="./style.css" />

<div id="header"></div>
<div id="source" class="editor"></div>
<div id="output" class="editor"></div>

<script src="./node_modules/monaco-editor/min/vs/loader.js"></script>
<script>
require.config({
paths: {
'vs': './node_modules/monaco-editor/min/vs'
}
})
require.config({
paths: {
vs: './node_modules/monaco-editor/min/vs',
},
})
</script>
<script src="./dist/template-explorer.global.js"></script>
<script>
require(['vs/editor/editor.main'], init /* injected by build */)
require(['vs/editor/editor.main'], init /* injected by build */)
</script>
Loading

0 comments on commit 8a99f90

Please sign in to comment.