From 90519cf7b6d43e7c8b55f6ff5daff2a3ac415d8e Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Wed, 18 Dec 2024 20:00:27 -0800 Subject: [PATCH] use `azsdkEslint.config` helper in eslint.config.mjs (#2949) * use `azsdkEslint.config` helper This is a follow-up of JS repo PR https://github.com/Azure/azure-sdk-for-js/pull/32073 * update baselines * update baseline * remove excess files --------- Co-authored-by: Jiao Di (MSFT) <80496810+v-jiaodi@users.noreply.github.com> --- .../generated/bodyComplexRest/eslint.config.mjs | 5 ++--- .../generated/bodyFileRest/eslint.config.mjs | 5 ++--- .../bodyFormDataRest/eslint.config.mjs | 5 ++--- .../generated/bodyStringRest/eslint.config.mjs | 5 ++--- .../generated/customUrlRest/eslint.config.mjs | 5 ++--- .../dpgCustomization/eslint.config.mjs | 5 ++--- .../generated/headerRest/eslint.config.mjs | 5 ++--- .../httpInfrastructureRest/eslint.config.mjs | 5 ++--- .../generated/lroRest/eslint.config.mjs | 5 ++--- .../generated/mediaTypesRest/eslint.config.mjs | 5 ++--- .../multipleInheritanceRest/eslint.config.mjs | 5 ++--- .../multipleUrlParameters/eslint.config.mjs | 5 ++--- .../generated/pagingRest/eslint.config.mjs | 5 ++--- .../generated/securityAADRest/eslint.config.mjs | 5 ++--- .../generated/securityKeyRest/eslint.config.mjs | 5 ++--- .../generated/urlRest/eslint.config.mjs | 5 ++--- .../agrifood-data-plane/eslint.config.mjs | 5 ++--- .../anomaly-detector-mv-rest/eslint.config.mjs | 5 ++--- .../anomaly-detector-rest/eslint.config.mjs | 5 ++--- .../eslint.config.mjs | 5 ++--- .../generated/rlc-initial/eslint.config.mjs | 5 ++--- .../generated/rlc-updated/eslint.config.mjs | 5 ++--- .../src/metadata/buildESLintConfig.ts | 10 ++++------ .../sdk/test/arm-test/eslint.config.mjs | 5 ++--- .../ai/generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../generated/typespec-ts/eslint.config.mjs | 5 ++--- .../repeatability/eslint.config.mjs | 17 ----------------- 50 files changed, 100 insertions(+), 167 deletions(-) delete mode 100644 packages/typespec-ts/test/integration/generated/special-headers/repeatability/eslint.config.mjs diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/bodyComplexRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/bodyComplexRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/bodyComplexRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/bodyComplexRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/bodyFileRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/bodyFileRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/bodyFileRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/bodyFileRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/bodyFormDataRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/bodyFormDataRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/bodyFormDataRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/bodyFormDataRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/bodyStringRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/customUrlRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/customUrlRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/customUrlRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/customUrlRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/dpgCustomization/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/dpgCustomization/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/dpgCustomization/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/dpgCustomization/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/headerRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/headerRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/headerRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/headerRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/httpInfrastructureRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/httpInfrastructureRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/httpInfrastructureRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/httpInfrastructureRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/lroRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/lroRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/lroRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/lroRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/mediaTypesRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/mediaTypesRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/mediaTypesRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/mediaTypesRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/multipleInheritanceRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/multipleInheritanceRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/multipleInheritanceRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/multipleInheritanceRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/multipleUrlParameters/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/multipleUrlParameters/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/multipleUrlParameters/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/multipleUrlParameters/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/pagingRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/pagingRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/pagingRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/pagingRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/securityAADRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/securityAADRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/securityAADRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/securityAADRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/securityKeyRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/securityKeyRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/securityKeyRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/securityKeyRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/rlcIntegration/generated/urlRest/eslint.config.mjs b/packages/autorest.typescript/test/rlcIntegration/generated/urlRest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/rlcIntegration/generated/urlRest/eslint.config.mjs +++ b/packages/autorest.typescript/test/rlcIntegration/generated/urlRest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/eslint.config.mjs b/packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/eslint.config.mjs +++ b/packages/autorest.typescript/test/smoke/generated/agrifood-data-plane/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/smoke/generated/anomaly-detector-mv-rest/eslint.config.mjs b/packages/autorest.typescript/test/smoke/generated/anomaly-detector-mv-rest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/smoke/generated/anomaly-detector-mv-rest/eslint.config.mjs +++ b/packages/autorest.typescript/test/smoke/generated/anomaly-detector-mv-rest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/eslint.config.mjs b/packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/eslint.config.mjs +++ b/packages/autorest.typescript/test/smoke/generated/anomaly-detector-rest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/smoke/generated/purview-administration-rest/eslint.config.mjs b/packages/autorest.typescript/test/smoke/generated/purview-administration-rest/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/smoke/generated/purview-administration-rest/eslint.config.mjs +++ b/packages/autorest.typescript/test/smoke/generated/purview-administration-rest/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/version-tolerance/generated/rlc-initial/eslint.config.mjs b/packages/autorest.typescript/test/version-tolerance/generated/rlc-initial/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/version-tolerance/generated/rlc-initial/eslint.config.mjs +++ b/packages/autorest.typescript/test/version-tolerance/generated/rlc-initial/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/autorest.typescript/test/version-tolerance/generated/rlc-updated/eslint.config.mjs b/packages/autorest.typescript/test/version-tolerance/generated/rlc-updated/eslint.config.mjs index f60441794f..72ca09c9dd 100644 --- a/packages/autorest.typescript/test/version-tolerance/generated/rlc-updated/eslint.config.mjs +++ b/packages/autorest.typescript/test/version-tolerance/generated/rlc-updated/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -11,4 +10,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/rlc-common/src/metadata/buildESLintConfig.ts b/packages/rlc-common/src/metadata/buildESLintConfig.ts index ff8b8c170b..a466f48fdb 100644 --- a/packages/rlc-common/src/metadata/buildESLintConfig.ts +++ b/packages/rlc-common/src/metadata/buildESLintConfig.ts @@ -6,8 +6,7 @@ import { RLCModel } from "../interfaces.js"; const eslintConfig = `import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -17,13 +16,12 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); `; const esLintConfigEsm = `import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -36,7 +34,7 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); `; export function buildEsLintConfig(model: RLCModel) { diff --git a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/sdk/test/arm-test/eslint.config.mjs b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/sdk/test/arm-test/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/sdk/test/arm-test/eslint.config.mjs +++ b/packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/sdk/test/arm-test/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/ai/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/ai/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/ai/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/ai/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/anomalyDetector/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/authoring/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/authoring/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/authoring/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/authoring/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/batch_modular/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/batch_modular/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/batch_modular/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/batch_modular/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/chatApi_modular/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/chatApi_modular/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/chatApi_modular/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/chatApi_modular/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/confidentialLedger/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/confidentialLedger/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/confidentialLedger/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/confidentialLedger/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/contentsafety_modular/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/contentsafety_modular/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/contentsafety_modular/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/contentsafety_modular/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/contoso/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/contoso/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/contoso/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/contoso/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/customWrapper/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/customWrapper/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/customWrapper/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/customWrapper/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/eventgrid_modular/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/eventgrid_modular/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/eventgrid_modular/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/eventgrid_modular/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/faceai/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/faceai/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/faceai/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/faceai/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/healthInsights_radiologyinsights/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/healthInsights_radiologyinsights/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/healthInsights_radiologyinsights/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/healthInsights_radiologyinsights/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/healthInsights_trialmatcher/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/healthInsights_trialmatcher/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/healthInsights_trialmatcher/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/healthInsights_trialmatcher/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/loadTest/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/loadTest/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/loadTest/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/loadTest/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/loadtesting_modular/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/loadtesting_modular/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/loadtesting_modular/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/loadtesting_modular/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/openai/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/openai/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/openai/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/openai/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/openai_generic/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/openai_generic/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/openai_generic/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/openai_generic/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/openai_modular/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/openai_modular/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/openai_modular/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/openai_modular/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/overloads_modular/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/overloads_modular/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/overloads_modular/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/overloads_modular/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/parametrizedHost/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/parametrizedHost/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/parametrizedHost/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/parametrizedHost/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/schemaRegistry/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/spread/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/spread/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/spread/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/spread/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/translator/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/translator/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/translator/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/translator/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-test/test/widget_dpg/generated/typespec-ts/eslint.config.mjs b/packages/typespec-test/test/widget_dpg/generated/typespec-ts/eslint.config.mjs index 113bdc3eaf..ac1c3c967e 100644 --- a/packages/typespec-test/test/widget_dpg/generated/typespec-ts/eslint.config.mjs +++ b/packages/typespec-test/test/widget_dpg/generated/typespec-ts/eslint.config.mjs @@ -1,7 +1,6 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; -export default [ - ...azsdkEslint.configs.recommended, +export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", @@ -14,4 +13,4 @@ export default [ "tsdoc/syntax": "warn" } } -]; +]); diff --git a/packages/typespec-ts/test/integration/generated/special-headers/repeatability/eslint.config.mjs b/packages/typespec-ts/test/integration/generated/special-headers/repeatability/eslint.config.mjs deleted file mode 100644 index 113bdc3eaf..0000000000 --- a/packages/typespec-ts/test/integration/generated/special-headers/repeatability/eslint.config.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; - -export default [ - ...azsdkEslint.configs.recommended, - { - rules: { - "@azure/azure-sdk/ts-modules-only-named": "warn", - "@azure/azure-sdk/ts-apiextractor-json-types": "warn", - "@azure/azure-sdk/ts-package-json-types": "warn", - "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", - "@azure/azure-sdk/ts-package-json-module": "off", - "@azure/azure-sdk/ts-package-json-files-required": "off", - "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", - "tsdoc/syntax": "warn" - } - } -];