Skip to content

Commit 0777090

Browse files
Update dependencies (#219)
* update dependency * fix eslint error * remove old eslint config * cover esm&cjs for testcase * update package.json export * fix test * add node 24 to ci config
1 parent 6196225 commit 0777090

26 files changed

+2429
-1764
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: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
"eol-last": ["error", "always"],
57+
"no-trailing-spaces": "error",
58+
"space-before-blocks": ["error", "always"],
59+
"no-multi-spaces": "error",
60+
61+
"no-multiple-empty-lines": ["error", {
62+
max: 1,
63+
}],
64+
65+
semi: ["error", "always"],
66+
},
67+
}, {
68+
files: ["**/.eslintrc.{js,cjs}"],
69+
70+
languageOptions: {
71+
globals: {
72+
...globals.node,
73+
},
74+
75+
ecmaVersion: 5,
76+
sourceType: "commonjs",
77+
},
78+
}]);

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/refresh.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const settings = await load(connectionString, {
3232

3333
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();

0 commit comments

Comments
 (0)