Skip to content

Commit 9df71d5

Browse files
[TypeSpec] Migrate to new rulesets package (#29193)
1 parent 67f3f22 commit 9df71d5

File tree

76 files changed

+101
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+101
-82
lines changed

eng/tools/typespec-validation/src/rules/linter-ruleset.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ export class LinterRulesetRule implements Rule {
4040

4141
let requiredRuleset = "";
4242
if (rpFolder?.trim()?.endsWith("resource-manager")) {
43-
requiredRuleset = "@azure-tools/typespec-azure-resource-manager/all";
43+
requiredRuleset = "@azure-tools/typespec-azure-rulesets/resource-manager";
4444
} else if (rpFolder?.trim()?.endsWith("data-plane")) {
45-
requiredRuleset = "@azure-tools/typespec-azure-core/all";
45+
requiredRuleset = "@azure-tools/typespec-azure-rulesets/data-plane";
4646
} else if (clientTspExists && !mainTspExists) {
4747
// Assume folders with no autorest setting, containing only "client.tsp" but no "main.tsp",
4848
// are data-plane (e.g. HealthInsights.TrialMatcher)
49-
requiredRuleset = "@azure-tools/typespec-azure-core/all";
49+
requiredRuleset = "@azure-tools/typespec-azure-rulesets/data-plane";
5050
} else {
5151
// Cannot determine if spec is data-plane or resource-manager, so cannot know
5252
// which linter ruleset is required.

eng/tools/typespec-validation/test/emit-autorest.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ emit:
4040
host.readTspConfig = async (_folder: string) => `
4141
linter:
4242
extends:
43-
- "@azure-tools/typespec-azure-core/all"
43+
- "@azure-tools/typespec-azure-rulesets/data-plane"
4444
`;
4545

4646
const result = await new EmitAutorestRule().execute(host, TsvTestHost.folder);

eng/tools/typespec-validation/test/tsv-test-host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ emit:
7373
- "@azure-tools/typespec-autorest"
7474
linter:
7575
extends:
76-
- "@azure-tools/typespec-azure-core/all"
76+
- "@azure-tools/typespec-azure-rulesets/data-plane"
7777
options:
7878
"@azure-tools/typespec-autorest":
7979
azure-resource-provider-folder: "data-plane"

package-lock.json

Lines changed: 22 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"@azure-tools/typespec-azure-core": "0.42.0",
77
"@azure-tools/typespec-azure-portal-core": "0.42.0",
88
"@azure-tools/typespec-azure-resource-manager": "0.42.1",
9-
"@azure-tools/typespec-client-generator-core": "0.42.0",
9+
"@azure-tools/typespec-client-generator-core": "0.42.3",
10+
"@azure-tools/typespec-azure-rulesets": "0.42.1",
1011
"@azure/avocado": "^0.8.4",
1112
"@typespec/compiler": "0.56.0",
1213
"@typespec/http": "0.56.0",

specification/ai/DocumentIntelligence/tspconfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ emit:
99
# - "@azure-tools/typespec-ts"
1010
linter:
1111
extends:
12-
- "@azure-tools/typespec-azure-core/all"
12+
- "@azure-tools/typespec-azure-rulesets/data-plane"
1313
options:
1414
"@azure-tools/typespec-autorest":
1515
azure-resource-provider-folder: "data-plane"

specification/ai/Face/tspconfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ options:
4040
flavor: azure
4141
linter:
4242
extends:
43-
- "@azure-tools/typespec-azure-core/all"
43+
- "@azure-tools/typespec-azure-rulesets/data-plane"
4444
disable:
4545
"@azure-tools/typespec-azure-core/operation-missing-api-version": "API version located in the host template"
4646
"@azure-tools/typespec-azure-core/use-standard-operations": "Most of our operation doesn't fit standard ops"

specification/ai/HealthInsights/HealthInsights.OpenAPI/tspconfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ emit:
77
- "@azure-tools/typespec-autorest"
88
linter:
99
extends:
10-
- "@azure-tools/typespec-azure-core/all"
10+
- "@azure-tools/typespec-azure-rulesets/data-plane"
1111
options:
1212
"@azure-tools/typespec-autorest":
1313
azure-resource-provider-folder: "data-plane"

specification/ai/HealthInsights/HealthInsights.RadiologyInsights/tspconfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ emit:
2222
- "@azure-tools/typespec-autorest"
2323
linter:
2424
extends:
25-
- "@azure-tools/typespec-azure-core/all"
25+
- "@azure-tools/typespec-azure-rulesets/data-plane"
2626
options:
2727
"@azure-tools/typespec-python":
2828
package-pprint-name: '"Azure Health Insights - Radiology Insights"'

specification/ai/ImageAnalysis/tspconfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ emit:
55
- "@azure-tools/typespec-autorest"
66
linter:
77
extends:
8-
- "@azure-tools/typespec-azure-core/all"
8+
- "@azure-tools/typespec-azure-rulesets/data-plane"
99
options:
1010
"@azure-tools/typespec-autorest":
1111
emitter-output-dir: "{project-root}/../"

0 commit comments

Comments
 (0)