Skip to content

Commit 0599e10

Browse files
committed
migrate from .json eslint config to new spec, update webserver logic and test cases.
1 parent 73c52e5 commit 0599e10

File tree

5 files changed

+113
-3702
lines changed

5 files changed

+113
-3702
lines changed

boiler-plate/node-express-server/.eslintrc.json

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { defineConfig } from "eslint/config";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default defineConfig([{
17+
extends: compat.extends("google"),
18+
19+
languageOptions: {
20+
globals: {
21+
...globals.browser,
22+
...globals.commonjs,
23+
...globals.node,
24+
},
25+
26+
ecmaVersion: "latest",
27+
sourceType: "commonjs",
28+
},
29+
30+
rules: {
31+
"new-cap": "off",
32+
},
33+
}]);

0 commit comments

Comments
 (0)