Skip to content

Commit b458bdf

Browse files
committed
Update test project configuration
1 parent c237f1d commit b458bdf

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

test-project/eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import creedengo from "@creedengo/eslint-plugin";
22
import eslint from "@eslint/js";
3+
import { defineConfig } from "eslint/config";
34
import globals from "globals";
45
import tseslint from "typescript-eslint";
56

6-
export default tseslint.config(
7+
export default defineConfig(
78
eslint.configs.recommended,
89
tseslint.configs.recommended,
910
creedengo.configs.recommended,

test-project/src/prefer-collections-with-pagination.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export class CatsController {
1818
}
1919

2020
@Get(":id") // Compliant: find a specific item of a collection
21-
public getSpecificItem(): Promise<string> {
22-
return null;
21+
public getSpecificItem(): Promise<string | null> {
22+
return Promise.resolve(null);
2323
}
2424

2525
@Get("page") // Compliant: collection is paginated

test-project/tsconfig.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
"rootDir": ".",
44
"sourceMap": true,
55
"declaration": false,
6-
"moduleResolution": "node",
6+
"moduleResolution": "node16",
77
"emitDecoratorMetadata": true,
8+
"esModuleInterop": true,
89
"experimentalDecorators": true,
910
"importHelpers": true,
10-
"target": "es2015",
11-
"module": "esnext",
12-
"lib": ["es2017", "dom"],
11+
"target": "es2022",
12+
"module": "nodenext",
13+
"lib": ["es2024", "dom"],
14+
"strict": true,
1315
"skipLibCheck": true,
1416
"skipDefaultLibCheck": true
1517
},

0 commit comments

Comments
 (0)