From: Kevin Deng 三咲智子 Date: Wed, 7 Aug 2024 02:57:18 +0000 (+0800) Subject: style: format html&markdown files (#11531) X-Git-Tag: v3.4.37~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a99f903db114d4996c0d41ccfea898371c0d487;p=thirdparty%2Fvuejs%2Fcore.git style: format html&markdown files (#11531) --- diff --git a/.github/commit-convention.md b/.github/commit-convention.md index d17a8bd4fc..11a64576a2 100644 --- a/.github/commit-convention.md +++ b/.github/commit-convention.md @@ -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**: ``` (): @@ -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 diff --git a/.github/contributing.md b/.github/contributing.md index 3ed1de4e02..6439f12398 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -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`. diff --git a/.github/maintenance.md b/.github/maintenance.md index 8d4317c6b0..b1fb550dd7 100644 --- a/.github/maintenance.md +++ b/.github/maintenance.md @@ -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 diff --git a/.prettierignore b/.prettierignore index fbd3dca8ca..ca3c40849f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,3 @@ dist -*.md -*.html pnpm-lock.yaml +CHANGELOG*.md diff --git a/SECURITY.md b/SECURITY.md index 6caf3621a4..a1bb8c4111 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -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) diff --git a/packages/compiler-dom/README.md b/packages/compiler-dom/README.md index 0027f54265..57748e661c 100644 --- a/packages/compiler-dom/README.md +++ b/packages/compiler-dom/README.md @@ -1 +1 @@ -# @vue/compiler-dom \ No newline at end of file +# @vue/compiler-dom diff --git a/packages/compiler-ssr/README.md b/packages/compiler-ssr/README.md index 5beb121e1f..9337906f42 100644 --- a/packages/compiler-ssr/README.md +++ b/packages/compiler-ssr/README.md @@ -1 +1 @@ -# @vue/compiler-ssr \ No newline at end of file +# @vue/compiler-ssr diff --git a/packages/runtime-core/README.md b/packages/runtime-core/README.md index 3a5b298120..452ef520c1 100644 --- a/packages/runtime-core/README.md +++ b/packages/runtime-core/README.md @@ -13,7 +13,7 @@ const { render, createApp } = createRenderer({ patchProp, insert, remove, - createElement + createElement, // ... }) diff --git a/packages/runtime-dom/README.md b/packages/runtime-dom/README.md index 2ac2c4de8b..11c373fe9e 100644 --- a/packages/runtime-dom/README.md +++ b/packages/runtime-dom/README.md @@ -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') diff --git a/packages/runtime-test/README.md b/packages/runtime-test/README.md index 6d6ba82982..6db8b810e2 100644 --- a/packages/runtime-test/README.md +++ b/packages/runtime-test/README.md @@ -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 = { diff --git a/packages/server-renderer/README.md b/packages/server-renderer/README.md index 4188fc93fd..55323e429e 100644 --- a/packages/server-renderer/README.md +++ b/packages/server-renderer/README.md @@ -11,7 +11,7 @@ ```ts function renderToString( input: App | VNode, - context?: SSRContext + context?: SSRContext, ): Promise ``` @@ -23,7 +23,7 @@ const { renderToString } = require('@vue/server-renderer') const app = createSSRApp({ data: () => ({ msg: 'hello' }), - template: `
{{ msg }}
` + template: `
{{ msg }}
`, }) ;(async () => { @@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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 { @@ -172,7 +172,7 @@ renderToSimpleStream( }, destroy(err) { // error encountered - } - } + }, + }, ) ``` diff --git a/packages/sfc-playground/index.html b/packages/sfc-playground/index.html index 2319a91876..3a21d956cd 100644 --- a/packages/sfc-playground/index.html +++ b/packages/sfc-playground/index.html @@ -1,4 +1,4 @@ - + @@ -7,13 +7,16 @@ Vue SFC Playground diff --git a/packages/sfc-playground/src/download/template/index.html b/packages/sfc-playground/src/download/template/index.html index 030a6ff51b..e631329c1b 100644 --- a/packages/sfc-playground/src/download/template/index.html +++ b/packages/sfc-playground/src/download/template/index.html @@ -1,4 +1,4 @@ - + diff --git a/packages/template-explorer/index.html b/packages/template-explorer/index.html index 81dc39146b..d1db969f01 100644 --- a/packages/template-explorer/index.html +++ b/packages/template-explorer/index.html @@ -1,6 +1,10 @@ Vue Template Explorer - - + +
@@ -8,13 +12,13 @@ diff --git a/packages/template-explorer/local.html b/packages/template-explorer/local.html index 6ec0ba20a7..c86cdb6b34 100644 --- a/packages/template-explorer/local.html +++ b/packages/template-explorer/local.html @@ -1,6 +1,10 @@ Vue Template Explorer - - + +
@@ -8,13 +12,13 @@ diff --git a/packages/vue-compat/README.md b/packages/vue-compat/README.md index 23e4ce9ebc..9428d6f6c7 100644 --- a/packages/vue-compat/README.md +++ b/packages/vue-compat/README.md @@ -84,12 +84,12 @@ The following workflow walks through the steps of migrating an actual Vue 2 app ...options, compilerOptions: { compatConfig: { - MODE: 2 - } - } + MODE: 2, + }, + }, } }) - } + }, } ``` @@ -103,8 +103,8 @@ The following workflow walks through the steps of migrating an actual Vue 2 app module.exports = { resolve: { alias: { - vue: '@vue/compat' - } + vue: '@vue/compat', + }, }, module: { rules: [ @@ -114,13 +114,13 @@ The following workflow walks through the steps of migrating an actual Vue 2 app options: { compilerOptions: { compatConfig: { - MODE: 2 - } - } - } - } - ] - } + MODE: 2, + }, + }, + }, + }, + ], + }, } ``` @@ -134,20 +134,20 @@ The following workflow walks through the steps of migrating an actual Vue 2 app export default { resolve: { alias: { - vue: '@vue/compat' - } + vue: '@vue/compat', + }, }, plugins: [ vue({ template: { compilerOptions: { compatConfig: { - MODE: 2 - } - } - } - }) - ] + MODE: 2, + }, + }, + }, + }), + ], } ``` @@ -207,7 +207,7 @@ import { configureCompat } from 'vue' // disable compat for certain features configureCompat({ FEATURE_ID_A: false, - FEATURE_ID_B: false + FEATURE_ID_B: false, }) ``` @@ -221,7 +221,7 @@ import { configureCompat } from 'vue' configureCompat({ MODE: 3, FEATURE_ID_A: true, - FEATURE_ID_B: true + FEATURE_ID_B: true, }) ``` @@ -233,8 +233,8 @@ A component can use the `compatConfig` option, which expects the same options as export default { compatConfig: { MODE: 3, // opt-in to Vue 3 behavior for this component only - FEATURE_ID_A: true // features can also be toggled at component level - } + FEATURE_ID_A: true, // features can also be toggled at component level + }, // ... } ``` @@ -256,73 +256,73 @@ Features that start with `COMPILER_` are compiler-specific: if you are using the > Should be fixed upfront or will likely lead to errors -| ID | Type | Description | Docs | -| ------------------------------------- | ---- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| GLOBAL_MOUNT_CONTAINER | ⨂ | Mounted application does not replace the element it's mounted to | [link](https://v3-migration.vuejs.org/breaking-changes/mount-changes.html) | -| CONFIG_DEVTOOLS | ⨂ | production devtools is now a build-time flag | [link](https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags) | -| COMPILER_V_IF_V_FOR_PRECEDENCE | ⨂ | `v-if` and `v-for` precedence when used on the same element has changed | [link](https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html) | -| COMPILER_V_IF_SAME_KEY | ⨂ | `v-if` branches can no longer have the same key | [link](https://v3-migration.vuejs.org/breaking-changes/key-attribute.html#on-conditional-branches) | -| COMPILER_V_FOR_TEMPLATE_KEY_PLACEMENT | ⨂ | `