Skip to content

Commit 9f486ec

Browse files
committed
Refactor ESLint configuration to apply TS rules specifically for TS files.
1 parent 56714b0 commit 9f486ec

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

components/log-viewer-webui/server/eslint.config.mjs

+21-14
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,39 @@ const EslintConfig = [
1515
...StylisticConfigArray,
1616
{
1717
rules: {
18-
"@typescript-eslint/require-await": [
19-
// Fastify recommends async syntax, but not all plugins require Promise resolution
20-
// in their function bodies.
21-
"off",
18+
"new-cap": [
19+
"error",
20+
{
21+
// TypeBox imports
22+
capIsNewExceptions: [
23+
"Type.Enum",
24+
"Type.Integer",
25+
],
26+
},
2227
],
28+
},
29+
},
30+
{
31+
files: [
32+
"**/*.ts",
33+
],
34+
rules: {
2335
"@typescript-eslint/no-floating-promises": [
2436
"error",
2537
{
2638
allowForKnownSafeCalls: [
2739
{
2840
from: "package",
2941
name: "test",
30-
package: "tap"
42+
package: "tap",
3143
},
3244
],
3345
},
3446
],
35-
"new-cap": [
36-
"error",
37-
{
38-
// TypeBox imports
39-
capIsNewExceptions: [
40-
"Type.Enum",
41-
"Type.Integer",
42-
],
43-
},
47+
"@typescript-eslint/require-await": [
48+
// Fastify recommends async syntax, but not all plugins require Promise resolution
49+
// in their function bodies.
50+
"off",
4451
],
4552
},
4653
},

0 commit comments

Comments
 (0)