Skip to content

Commit 4682649

Browse files
Merge pull request #222 from Azure/merge-main-to-preview
Merge main to preview
2 parents 995469c + f880e53 commit 4682649

32 files changed

+2459
-1787
lines changed

.eslintrc

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [18.x, 20.x, 22.x]
16+
node-version: [18.x, 20.x, 22.x, 24.x]
1717

1818
steps:
1919
- uses: actions/checkout@v3

cjs-package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "commonjs"
3+
}

eslint.config.mjs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
3+
import globals from "globals";
4+
import tsParser from "@typescript-eslint/parser";
5+
import path from "node:path";
6+
import { fileURLToPath } from "node:url";
7+
import js from "@eslint/js";
8+
import { FlatCompat } from "@eslint/eslintrc";
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all
16+
});
17+
18+
export default defineConfig([globalIgnores([
19+
"node_modules/**",
20+
"dist/**",
21+
"dist-esm/**",
22+
"types/**",
23+
"*.min.js",
24+
"coverage/**"
25+
]), {
26+
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
27+
28+
plugins: {
29+
"@typescript-eslint": typescriptEslint,
30+
},
31+
32+
languageOptions: {
33+
globals: {
34+
...globals.browser,
35+
...globals.commonjs,
36+
...globals.node,
37+
...globals.mocha,
38+
},
39+
40+
parser: tsParser,
41+
ecmaVersion: "latest",
42+
sourceType: "commonjs",
43+
},
44+
45+
rules: {
46+
"keyword-spacing": ["error", {
47+
before: true,
48+
after: true,
49+
}],
50+
51+
quotes: ["error", "double", {
52+
avoidEscape: true,
53+
}],
54+
55+
"@typescript-eslint/no-explicit-any": "off",
56+
"@typescript-eslint/no-require-imports": "off",
57+
"eol-last": ["error", "always"],
58+
"no-trailing-spaces": "error",
59+
"space-before-blocks": ["error", "always"],
60+
"no-multi-spaces": "error",
61+
62+
"no-multiple-empty-lines": ["error", {
63+
max: 1,
64+
}],
65+
66+
semi: ["error", "always"],
67+
},
68+
}, {
69+
files: ["**/.eslintrc.{js,cjs}"],
70+
71+
languageOptions: {
72+
globals: {
73+
...globals.node,
74+
},
75+
76+
ecmaVersion: 5,
77+
sourceType: "commonjs",
78+
},
79+
}]);

esm-package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

examples/console-app/configObject.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33

44
import * as dotenv from "dotenv";
5-
dotenv.config()
5+
dotenv.config();
66

77
/**
88
* This example demonstrates how to construct a configuration object from settings loaded from Azure App Configuration.

examples/console-app/helloworld.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33

44
import * as dotenv from "dotenv";
5-
dotenv.config()
5+
dotenv.config();
66

77
/**
88
* This example retrives all settings with key following pattern "app.settings.*", i.e. starting with "app.settings.".
@@ -23,4 +23,4 @@ const settings = await load(connectionString, {
2323
});
2424
const message = settings.get("message");
2525

26-
console.log(`Message from Azure App Configuration: ${message}`);
26+
console.log(`Message from Azure App Configuration: ${message}`);

examples/console-app/helloworld_aad.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33

44
import * as dotenv from "dotenv";
5-
dotenv.config()
5+
dotenv.config();
66

77
/**
88
* This example retrives all settings with key following pattern "app.settings.*", i.e. starting with "app.settings.".
@@ -28,4 +28,4 @@ const settings = await load(endpoint, credential, {
2828
});
2929
const message = settings.get("message");
3030

31-
console.log(`Message from Azure App Configuration: ${message}`);
31+
console.log(`Message from Azure App Configuration: ${message}`);

examples/console-app/refresh.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ const settings = await load(connectionString, {
3030
}
3131
});
3232

33-
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.")
33+
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.");
3434

35-
// eslint-disable-next-line no-constant-condition
3635
while (true) {
3736
// this is a blocking call and you can remove await to make the refresh operation asynchronous
3837
await settings.refresh();

examples/console-app/secretReference.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33

44
import * as dotenv from "dotenv";
5-
dotenv.config()
5+
dotenv.config();
66

77
/**
88
* Before you run it, please add a Key Vault reference with key "app.secret" in your App Configuration store.
@@ -28,4 +28,4 @@ const settings = await load(endpoint, credential, {
2828
const secretKey = "app.secret";
2929
const value = settings.get(secretKey);
3030

31-
console.log(`Get the secret from keyvault key: ${secretKey}, value: ${value}`);
31+
console.log(`Get the secret from keyvault key: ${secretKey}, value: ${value}`);

0 commit comments

Comments
 (0)