Merge branch 'main' into next
# Conflicts: # package.json # scripts/release/yarn.lock # yarn.lock
This commit is contained in:
commit
151ab582b5
9 files changed
+37
-9
No files matched your search
@@ -14,6 +14,10 @@
|
||||
excludePackageNames: ["@babel/parser"],
|
||||
groupName: "babel",
|
||||
},
|
||||
{
|
||||
matchPackagePrefixes: ["@typescript-eslint/"],
|
||||
groupName: "typescript-eslint",
|
||||
},
|
||||
{
|
||||
branchPrefix: "renovate/website/",
|
||||
matchPaths: ["website/package.json"],
|
||||
|
||||
@@ -206,6 +206,7 @@
|
||||
"Monteiro",
|
||||
"Morrell",
|
||||
"motiz",
|
||||
"Motoko",
|
||||
"mousedown",
|
||||
"mouseup",
|
||||
"mprettier",
|
||||
|
||||
@@ -80,7 +80,7 @@ singleQuote = true
|
||||
|
||||
Overrides let you have different configuration for certain file extensions, folders and specific files.
|
||||
|
||||
Prettier borrows ESLint’s [override format](https://eslint.org/docs/user-guide/configuring#example-configuration).
|
||||
Prettier borrows ESLint’s [override format](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#how-do-overrides-work).
|
||||
|
||||
JSON:
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ The downsides of those plugins are:
|
||||
- They are slower than running Prettier directly.
|
||||
- They’re yet one layer of indirection where things may break.
|
||||
|
||||
Finally, we have tools that run `prettier` and then immediately for example `eslint --fix` on files.
|
||||
Finally, we have tools that run `prettier` and then immediately lint files by running, for example, `eslint --fix` on them.
|
||||
|
||||
- [prettier-eslint](https://github.com/prettier/prettier-eslint)
|
||||
- [prettier-stylelint](https://github.com/hugomrdias/prettier-stylelint)
|
||||
|
||||
@@ -66,6 +66,7 @@ To turn off plugin autoloading, use `--no-plugin-search` when using Prettier CLI
|
||||
- [`prettier-plugin-java`](https://github.com/jhipster/prettier-java) by [**@JHipster**](https://github.com/jhipster)
|
||||
- [`prettier-plugin-jsonata`](https://github.com/Stedi/prettier-plugin-jsonata) by [**@Stedi**](https://github.com/Stedi)
|
||||
- [`prettier-plugin-kotlin`](https://github.com/Angry-Potato/prettier-plugin-kotlin) by [**@Angry-Potato**](https://github.com/Angry-Potato)
|
||||
- [`prettier-plugin-motoko`](https://github.com/dfinity/prettier-plugin-motoko) by [**@dfinity**](https://github.com/dfinity)
|
||||
- [`prettier-plugin-nginx`](https://github.com/joedeandev/prettier-plugin-nginx) by [**@joedeandev**](https://github.com/joedeandev)
|
||||
- [`prettier-plugin-prisma`](https://github.com/umidbekk/prettier-plugin-prisma) by [**@umidbekk**](https://github.com/umidbekk)
|
||||
- [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties) by [**@eemeli**](https://github.com/eemeli)
|
||||
@@ -164,6 +165,7 @@ export const printers = {
|
||||
canAttachComment,
|
||||
isBlockComment,
|
||||
printComment,
|
||||
getCommentChildNodes,
|
||||
handleComments: {
|
||||
ownLine,
|
||||
endOfLine,
|
||||
@@ -373,6 +375,21 @@ Comments are often not part of a language's AST and present a challenge for pret
|
||||
|
||||
By default, if the AST has a top-level `comments` property, Prettier assumes that `comments` stores an array of comment nodes. Prettier will then use the provided `parsers[<plugin>].locStart`/`locEnd` functions to search for the AST node that each comment "belongs" to. Comments are then attached to these nodes **mutating the AST in the process**, and the `comments` property is deleted from the AST root. The `*Comment` functions are used to adjust Prettier's algorithm. Once the comments are attached to the AST, Prettier will automatically call the `printComment(path, options): Doc` function and insert the returned doc into the (hopefully) correct place.
|
||||
|
||||
#### (optional) `getCommentChildNodes`
|
||||
|
||||
By default, Prettier searches all object properties (except for a few predefined ones) of each node recursively. This function can be provided to override that behavior. It has the signature:
|
||||
|
||||
```ts
|
||||
function getCommentChildNodes(
|
||||
// The node whose children should be returned.
|
||||
node: AST,
|
||||
// Current options
|
||||
options: object
|
||||
): AST[] | undefined;
|
||||
```
|
||||
|
||||
Return `[]` if the node has no children or `undefined` to fall back on the default behavior.
|
||||
|
||||
#### (optional) `printComment`
|
||||
|
||||
Called whenever a comment node needs to be printed. It has the signature:
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@
|
||||
"jest-snapshot-serializer-raw": "1.2.0",
|
||||
"jest-watch-typeahead": "2.1.1",
|
||||
"node-actionlint": "1.2.2",
|
||||
"node-fetch": "3.2.4",
|
||||
"node-fetch": "3.2.10",
|
||||
"npm-run-all": "4.1.5",
|
||||
"path-browserify": "1.0.1",
|
||||
"prettier": "2.7.1",
|
||||
|
||||
@@ -154,6 +154,10 @@ function getSyntaxFromCategory(category) {
|
||||
return "jsx";
|
||||
case "typescript":
|
||||
return "tsx";
|
||||
case "css":
|
||||
case "scss":
|
||||
case "less":
|
||||
return "css";
|
||||
default:
|
||||
return category;
|
||||
}
|
||||
@@ -175,6 +179,8 @@ function getCommentForSyntax(syntax, comment) {
|
||||
return `# ${comment}`;
|
||||
case "hbs":
|
||||
return `{{! ${comment} }}`;
|
||||
case "css":
|
||||
return `/* ${comment} */`;
|
||||
default:
|
||||
return `// ${comment}`;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ singleQuote = true
|
||||
|
||||
Overrides let you have different configuration for certain file extensions, folders and specific files.
|
||||
|
||||
Prettier borrows ESLint’s [override format](https://eslint.org/docs/user-guide/configuring#example-configuration).
|
||||
Prettier borrows ESLint’s [override format](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#how-do-overrides-work).
|
||||
|
||||
JSON:
|
||||
|
||||
|
||||
@@ -6241,14 +6241,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"node-fetch@npm:3.2.4":
|
||||
version: 3.2.4
|
||||
resolution: "node-fetch@npm:3.2.4"
|
||||
"node-fetch@npm:3.2.10":
|
||||
version: 3.2.10
|
||||
resolution: "node-fetch@npm:3.2.10"
|
||||
dependencies:
|
||||
data-uri-to-buffer: ^4.0.0
|
||||
fetch-blob: ^3.1.4
|
||||
formdata-polyfill: ^4.0.10
|
||||
checksum: cfc715441302167bd4a9c6d6f3ff8eecb65e5aeeccd55a690497dcce5f95ec017d65c5682414287cad3998a28b1bab4820dcbe51852902eaa5f15f3975562384
|
||||
checksum: e65322431f4897ded04197aa5923eaec63a8d53e00432de4e70a4f7006625c8dc32629c5c35f4fe8ee719a4825544d07bf53f6e146a7265914262f493e8deac1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6971,7 +6971,7 @@ __metadata:
|
||||
minimist: 1.2.6
|
||||
n-readlines: 1.0.1
|
||||
node-actionlint: 1.2.2
|
||||
node-fetch: 3.2.4
|
||||
node-fetch: 3.2.10
|
||||
npm-run-all: 4.1.5
|
||||
outdent: 0.8.0
|
||||
parse-srcset: "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee"
|
||||
|
||||
Reference in new issue
Block a user