From b58a8e84f9aae3dba8b132c17d6ff64875c2888e Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 1 Apr 2024 15:16:30 -0700 Subject: [PATCH] Enable no-closed-literal rule (#505) Co-authored-by: Mark Cowlishaw --- .../enable-no-closed-literal-union-2024-2-22-21-29-27.md | 8 ++++++++ packages/typespec-azure-core/src/linter.ts | 1 + 2 files changed, 9 insertions(+) create mode 100644 .chronus/changes/enable-no-closed-literal-union-2024-2-22-21-29-27.md diff --git a/.chronus/changes/enable-no-closed-literal-union-2024-2-22-21-29-27.md b/.chronus/changes/enable-no-closed-literal-union-2024-2-22-21-29-27.md new file mode 100644 index 0000000000..5e8fcf55b9 --- /dev/null +++ b/.chronus/changes/enable-no-closed-literal-union-2024-2-22-21-29-27.md @@ -0,0 +1,8 @@ +--- +# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking +changeKind: feature +packages: + - "@azure-tools/typespec-azure-core" +--- + +Enable `no-closed-literal` linter rule by default in `all` ruleset diff --git a/packages/typespec-azure-core/src/linter.ts b/packages/typespec-azure-core/src/linter.ts index 898b4a2579..9dfcb27c75 100644 --- a/packages/typespec-azure-core/src/linter.ts +++ b/packages/typespec-azure-core/src/linter.ts @@ -111,6 +111,7 @@ export const $linter = defineLinter({ [`@azure-tools/typespec-azure-core/${useStandardNames.name}`]: true, [`@azure-tools/typespec-azure-core/${friendlyNameRule.name}`]: true, [`@azure-tools/typespec-azure-core/${noEnumRule.name}`]: true, + [`@azure-tools/typespec-azure-core/${noClosedLiteralUnionRule.name}`]: true, }, extends: ["@typespec/http/all"], },