@typespec/prettier-plugin-typespec 0.53.0-dev.0 → 0.54.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -629,6 +629,12 @@ const diagnostics = {
|
|
|
629
629
|
array: "Cannot intersect an array model.",
|
|
630
630
|
},
|
|
631
631
|
},
|
|
632
|
+
"no-array-properties": {
|
|
633
|
+
severity: "error",
|
|
634
|
+
messages: {
|
|
635
|
+
default: "Array models cannot have any properties.",
|
|
636
|
+
},
|
|
637
|
+
},
|
|
632
638
|
"intersect-duplicate-property": {
|
|
633
639
|
severity: "error",
|
|
634
640
|
messages: {
|
|
@@ -4605,7 +4611,7 @@ path, options, print) {
|
|
|
4605
4611
|
const value = needsParens(path) ? ["(", printedNode, ")"] : printedNode;
|
|
4606
4612
|
const parts = [docs, directives, value];
|
|
4607
4613
|
if (node.kind === SyntaxKind.TypeSpecScript) {
|
|
4608
|
-
// For TypeSpecScript(root of
|
|
4614
|
+
// For TypeSpecScript(root of TypeSpec document) we had a new line at the end.
|
|
4609
4615
|
// This must be done here so the hardline entry can be the last item of the doc array returned by the printer
|
|
4610
4616
|
// so the markdown(and other embedded formatter) can omit that extra line.
|
|
4611
4617
|
parts.push(hardline);
|
|
@@ -7758,7 +7764,7 @@ function createParser(code, options = {}) {
|
|
|
7758
7764
|
/**
|
|
7759
7765
|
* Parses a documentation tag.
|
|
7760
7766
|
*
|
|
7761
|
-
* @see <a href="https://
|
|
7767
|
+
* @see <a href="https://typespec.io/docs/language-basics/documentation#doc-comments">TypeSpec documentation docs</a>
|
|
7762
7768
|
*/
|
|
7763
7769
|
function parseDocTag() {
|
|
7764
7770
|
const pos = tokenPos();
|