From 10ad8a8d8c3b18b4ff33c67ff6884db748618daf Mon Sep 17 00:00:00 2001 From: zhiyuanliang Date: Thu, 28 Aug 2025 22:30:36 +0800 Subject: [PATCH 1/2] add comma --- examples/console-app/configObject.mjs | 2 +- examples/console-app/helloworld.mjs | 2 +- examples/console-app/helloworld_aad.mjs | 2 +- examples/console-app/secretReference.mjs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/console-app/configObject.mjs b/examples/console-app/configObject.mjs index ef376b99..add4330c 100644 --- a/examples/console-app/configObject.mjs +++ b/examples/console-app/configObject.mjs @@ -2,7 +2,7 @@ // Licensed under the MIT license. import * as dotenv from "dotenv"; -dotenv.config() +dotenv.config(); /** * This example demonstrates how to construct a configuration object from settings loaded from Azure App Configuration. diff --git a/examples/console-app/helloworld.mjs b/examples/console-app/helloworld.mjs index 5a3558c7..630d386a 100644 --- a/examples/console-app/helloworld.mjs +++ b/examples/console-app/helloworld.mjs @@ -2,7 +2,7 @@ // Licensed under the MIT license. import * as dotenv from "dotenv"; -dotenv.config() +dotenv.config(); /** * This example retrives all settings with key following pattern "app.settings.*", i.e. starting with "app.settings.". diff --git a/examples/console-app/helloworld_aad.mjs b/examples/console-app/helloworld_aad.mjs index 37ac15e8..55a4474d 100644 --- a/examples/console-app/helloworld_aad.mjs +++ b/examples/console-app/helloworld_aad.mjs @@ -2,7 +2,7 @@ // Licensed under the MIT license. import * as dotenv from "dotenv"; -dotenv.config() +dotenv.config(); /** * This example retrives all settings with key following pattern "app.settings.*", i.e. starting with "app.settings.". diff --git a/examples/console-app/secretReference.mjs b/examples/console-app/secretReference.mjs index dee0e183..ef146ff9 100644 --- a/examples/console-app/secretReference.mjs +++ b/examples/console-app/secretReference.mjs @@ -2,7 +2,7 @@ // Licensed under the MIT license. import * as dotenv from "dotenv"; -dotenv.config() +dotenv.config(); /** * Before you run it, please add a Key Vault reference with key "app.secret" in your App Configuration store. From 760f382ee691519a90b96d0462aaad3addc83657 Mon Sep 17 00:00:00 2001 From: Zhiyuan Liang Date: Mon, 1 Sep 2025 17:07:55 +0800 Subject: [PATCH 2/2] add lint check for examples --- examples/console-app/helloworld.mjs | 2 +- examples/console-app/helloworld_aad.mjs | 2 +- examples/console-app/refresh.mjs | 2 +- examples/console-app/secretReference.mjs | 2 +- examples/web-app/httpserver.mjs | 2 +- package.json | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/console-app/helloworld.mjs b/examples/console-app/helloworld.mjs index 630d386a..e26703e7 100644 --- a/examples/console-app/helloworld.mjs +++ b/examples/console-app/helloworld.mjs @@ -23,4 +23,4 @@ const settings = await load(connectionString, { }); const message = settings.get("message"); -console.log(`Message from Azure App Configuration: ${message}`); \ No newline at end of file +console.log(`Message from Azure App Configuration: ${message}`); diff --git a/examples/console-app/helloworld_aad.mjs b/examples/console-app/helloworld_aad.mjs index 55a4474d..ae01853b 100644 --- a/examples/console-app/helloworld_aad.mjs +++ b/examples/console-app/helloworld_aad.mjs @@ -28,4 +28,4 @@ const settings = await load(endpoint, credential, { }); const message = settings.get("message"); -console.log(`Message from Azure App Configuration: ${message}`); \ No newline at end of file +console.log(`Message from Azure App Configuration: ${message}`); diff --git a/examples/console-app/refresh.mjs b/examples/console-app/refresh.mjs index 9e622023..0b54b5c2 100644 --- a/examples/console-app/refresh.mjs +++ b/examples/console-app/refresh.mjs @@ -30,7 +30,7 @@ const settings = await load(connectionString, { } }); -console.log("Using Azure portal or CLI, update the `app.settings.message` value, and then update the `app.settings.sentinel` value in your App Configuration store.") +console.log("Using Azure portal or CLI, update the `app.settings.message` value, and then update the `app.settings.sentinel` value in your App Configuration store."); // eslint-disable-next-line no-constant-condition while (true) { diff --git a/examples/console-app/secretReference.mjs b/examples/console-app/secretReference.mjs index ef146ff9..a21bc97c 100644 --- a/examples/console-app/secretReference.mjs +++ b/examples/console-app/secretReference.mjs @@ -28,4 +28,4 @@ const settings = await load(endpoint, credential, { const secretKey = "app.secret"; const value = settings.get(secretKey); -console.log(`Get the secret from keyvault key: ${secretKey}, value: ${value}`); \ No newline at end of file +console.log(`Get the secret from keyvault key: ${secretKey}, value: ${value}`); diff --git a/examples/web-app/httpserver.mjs b/examples/web-app/httpserver.mjs index d5519d04..f7072ecb 100644 --- a/examples/web-app/httpserver.mjs +++ b/examples/web-app/httpserver.mjs @@ -2,7 +2,7 @@ // Licensed under the MIT license. import * as dotenv from "dotenv"; -dotenv.config() +dotenv.config(); import { load } from "@azure/app-configuration-provider"; import { DefaultAzureCredential } from "@azure/identity"; diff --git a/package.json b/package.json index d5934885..58f911ed 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "build-test": "tsc -p ./tsconfig.test.json", "clean": "rimraf dist dist-esm out types", "dev": "rollup --config --watch", - "lint": "eslint src/ test/", - "fix-lint": "eslint src/ test/ --fix", + "lint": "eslint src/ test/ examples/ --ext .js,.ts,.mjs,.cjs", + "fix-lint": "eslint src/ test/ examples/ --fix --ext .js,.ts,.mjs,.cjs", "test": "mocha out/test/*.test.{js,cjs,mjs} --parallel" }, "repository": {