Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [18.x, 20.x, 22.x, 24.x]

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 3 additions & 0 deletions cjs-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
79 changes: 79 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { defineConfig, globalIgnores } from "eslint/config";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default defineConfig([globalIgnores([
"node_modules/**",
"dist/**",
"dist-esm/**",
"types/**",
"*.min.js",
"coverage/**"
]), {
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),

plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
...globals.node,
...globals.mocha,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "commonjs",
},

rules: {
"keyword-spacing": ["error", {
before: true,
after: true,
}],

quotes: ["error", "double", {
avoidEscape: true,
}],

"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-require-imports": "off",
"eol-last": ["error", "always"],
"no-trailing-spaces": "error",
"space-before-blocks": ["error", "always"],
"no-multi-spaces": "error",

"no-multiple-empty-lines": ["error", {
max: 1,
}],

semi: ["error", "always"],
},
}, {
files: ["**/.eslintrc.{js,cjs}"],

languageOptions: {
globals: {
...globals.node,
},

ecmaVersion: 5,
sourceType: "commonjs",
},
}]);
3 changes: 3 additions & 0 deletions esm-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
2 changes: 1 addition & 1 deletion examples/console-app/configObject.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions examples/console-app/helloworld.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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.".
Expand All @@ -23,4 +23,4 @@ const settings = await load(connectionString, {
});
const message = settings.get("message");

console.log(`Message from Azure App Configuration: ${message}`);
console.log(`Message from Azure App Configuration: ${message}`);
4 changes: 2 additions & 2 deletions examples/console-app/helloworld_aad.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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.".
Expand All @@ -28,4 +28,4 @@ const settings = await load(endpoint, credential, {
});
const message = settings.get("message");

console.log(`Message from Azure App Configuration: ${message}`);
console.log(`Message from Azure App Configuration: ${message}`);
3 changes: 1 addition & 2 deletions examples/console-app/refresh.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ 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) {
// this is a blocking call and you can remove await to make the refresh operation asynchronous
await settings.refresh();
Expand Down
4 changes: 2 additions & 2 deletions examples/console-app/secretReference.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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}`);
console.log(`Get the secret from keyvault key: ${secretKey}, value: ${value}`);
2 changes: 1 addition & 1 deletion examples/web-app/httpserver.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading