@azure-tools/typespec-azure-core 0.53.0-dev.2 → 0.53.0-dev.3

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 CHANGED
@@ -53,7 +53,6 @@ Available ruleSets:
53
53
  | `@azure-tools/typespec-azure-core/no-multiple-discriminator` | Classes should have at most one discriminator. |
54
54
  | `@azure-tools/typespec-azure-core/no-rest-library-interfaces` | Resource interfaces from the TypeSpec.Rest.Resource library are incompatible with Azure.Core. |
55
55
  | `@azure-tools/typespec-azure-core/no-unknown` | Azure services must not have properties of type `unknown`. |
56
- | `@azure-tools/typespec-azure-core/property-name-conflict` | Avoid naming conflicts between a property and a model of the same name. |
57
56
  | [`@azure-tools/typespec-azure-core/bad-record-type`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/bad-record-type) | Identify bad record definitions. |
58
57
  | `@azure-tools/typespec-azure-core/documentation-required` | Require documentation over enums, models, and operations. |
59
58
  | `@azure-tools/typespec-azure-core/key-visibility-required` | Key properties need to have a Lifecycle visibility setting. |
@@ -1 +1 @@
1
- {"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAiFA,eAAO,MAAM,OAAO,+CASlB,CAAC"}
1
+ {"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AA+EA,eAAO,MAAM,OAAO,+CASlB,CAAC"}
@@ -27,7 +27,6 @@ import { preferCsvCollectionFormatRule } from "./rules/prefer-csv-collection-for
27
27
  import { preventFormatRule } from "./rules/prevent-format.js";
28
28
  import { preventRestLibraryInterfaces } from "./rules/prevent-rest-library.js";
29
29
  import { preventUnknownType } from "./rules/prevent-unknown.js";
30
- import { propertyNameRule } from "./rules/property-naming.js";
31
30
  import { bodyArrayRule } from "./rules/request-body-array.js";
32
31
  import { requireDocumentation } from "./rules/require-docs.js";
33
32
  import { requireKeyVisibility } from "./rules/require-key-visibility.js";
@@ -62,7 +61,6 @@ const rules = [
62
61
  noMultipleDiscriminatorRule,
63
62
  preventRestLibraryInterfaces,
64
63
  preventUnknownType,
65
- propertyNameRule,
66
64
  badRecordTypeRule,
67
65
  requireDocumentation,
68
66
  requireKeyVisibility,
@@ -1 +1 @@
1
- {"version":3,"file":"linter.js","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,4CAA4C,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,C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MAAM,8CAA8C,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,MAAM,KAAK,GAAG;IACZ,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,QAAQ;IACR,UAAU;IACV,8BAA8B;IAC9B,iBAAiB;IACjB,4CAA4C;IAC5C,wBAAwB;IACxB,UAAU;IACV,sBAAsB;IACtB,2BAA2B;IAC3B,yBAAyB;IACzB,oBAAoB;IACpB,cAAc;IACd,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,aAAa;IACb,6BAA6B;IAC7B,iBAAiB;IACjB,2BAA2B;IAC3B,4BAA4B;IAC5B,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,iCAAiC;IACjC,2BAA2B;IAC3B,4BAA4B;IAC5B,gBAAgB;IAChB,qBAAqB;IACrB,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,cAAc;IACd,kBAAkB;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAClC,KAAK;IACL,QAAQ,EAAE;QACR,sBAAsB,EAAE;YACtB,MAAM,EAAE;gBACN,CAAC,oCAAoC,yBAAyB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;aAC7E;SACF;KACF;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-core",
3
- "version": "0.53.0-dev.2",
3
+ "version": "0.53.0-dev.3",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Core library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -1,4 +0,0 @@
1
- export declare const propertyNameRule: import("@typespec/compiler").LinterRuleDefinition<"property-name-conflict", {
2
- readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
3
- }>;
4
- //# sourceMappingURL=property-naming.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-naming.d.ts","sourceRoot":"","sources":["../../../src/rules/property-naming.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB;;EAsB3B,CAAC"}
@@ -1,27 +0,0 @@
1
- import { createRule, paramMessage } from "@typespec/compiler";
2
- import { isExcludedCoreType } from "./utils.js";
3
- export const propertyNameRule = createRule({
4
- name: "property-name-conflict",
5
- description: "Avoid naming conflicts between a property and a model of the same name.",
6
- severity: "warning",
7
- messages: {
8
- default: paramMessage `Property '${"propertyName"}' having the same name as its enclosing model will cause problems with C# code generation. Consider renaming the property directly or using the @clientName("newName", "csharp") decorator to rename the property for C#.`,
9
- },
10
- create(context) {
11
- return {
12
- modelProperty: (property) => {
13
- if (isExcludedCoreType(context.program, property))
14
- return;
15
- const modelName = property.model?.name.toLocaleLowerCase();
16
- const propertyName = property.name.toLocaleLowerCase();
17
- if (propertyName === modelName) {
18
- context.reportDiagnostic({
19
- format: { propertyName: property.name },
20
- target: property,
21
- });
22
- }
23
- },
24
- };
25
- },
26
- });
27
- //# sourceMappingURL=property-naming.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"property-naming.js","sourceRoot":"","sources":["../../../src/rules/property-naming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACzC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,yEAAyE;IACtF,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,aAAa,cAAc,2NAA2N;KAC5Q;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,aAAa,EAAE,CAAC,QAAuB,EAAE,EAAE;gBACzC,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC;oBAAE,OAAO;gBAC1D,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBAC3D,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvD,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;oBAC/B,OAAO,CAAC,gBAAgB,CAAC;wBACvB,MAAM,EAAE,EAAE,YAAY,EAAE,QAAQ,CAAC,IAAI,EAAE;wBACvC,MAAM,EAAE,QAAQ;qBACjB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}